Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Creating Work Orders w/Mincom Connector

Creating Work Orders w/Mincom Connector

Creating Work Orders w/Mincom Connector

We currently are running Ellipse 6.1 in a Windows environment.  I'm looking for some sample code that demos how to create work order using the Mincom Connector.  I'm using C# .Net Visual Studio 2003.  

Replies continue below

Recommended for you

RE: Creating Work Orders w/Mincom Connector

We have Ellipse wk3 and I am using Visual Studio 2005 (C# Language). This is how I am creating a work order using the Mincom Connector.

public bool createDriveUpWO(string WoDesc,
                           string OriginatorID,
                           string WoType,
                           string MaintType,
                           string componentCode,
                           string EquipNo,
                           string VehicleNo,
                           string WorkGroup,
                           string JobCodeX4,
                           string JobCodeX6,
                           string planStartDate)
   MIMSX.MIMSBlock createBlock;
   MIMSX.MIMSReply createReply;
   MIMSX.MIMSRequest createRequest;
   MIMSX.MIMSInstance createInstance;

     #region Variables   

     #region Account Code   
     string accountCode = "9010" + VehicleNo.Substring(0,1) + "016100000";


     createBlock = mimsServer.Blocks.New("createWoBlock");
                createRequest = createBlock.Requests.New("createWoRequest");

      createInstance = createRequest.Instances.New("createWoInstance");

       createInstance.AddFieldNameValue("DstrctCode", "DIS1");
       createInstance.AddFieldNameValue("WoDesc", WoDesc);
       createInstance.AddFieldNameValue("OriginatorId", OriginatorID);
       createInstance.AddFieldNameValue("WoType", "FL");
       createInstance.AddFieldNameValue("MaintType", MaintType);
       createInstance.AddFieldNameValue("WorkGroup", WorkGroup);
       createInstance.AddFieldNameValue("EquipNo", EquipNo);
       createInstance.AddFieldNameValue("WoPrefix", "FL");
       createInstance.AddFieldNameValue("JobCode4", JobCodeX4);
       createInstance.AddFieldNameValue("JobCode6", JobCodeX6);
       createInstance.AddFieldNameValue("AccountCode", accountCode);
       createInstance.AddFieldNameValue("PlanStrDate", planStartDate);
       createInstance.AddFieldNameValue("ReqByDate", planStartDate);
        if (!string.IsNullOrEmpty(componentCode))
           createInstance.AddFieldNameValue("CompCode", componentCode);

         #region currentVehicleMileage
         if (!string.IsNullOrEmpty(globalVariables.currentVehicleMileage))
          if (globalVariables.useMileage)
               createInstance.AddFieldNameValue("OrigDocType", "VM");
               createInstance.AddFieldNameValue("OrigDocNo", globalVariables.currentVehicleMileage);

         createReply = createBlock.Send(true);
         globalVariables.returnedWorkOrder = Convert.ToString(createReply.Requests.Item(1).Instances.Item(1).Fields.Item("WorkOrder").Value);


          return true;
             MIMSX.MIMSError error;
             error = mimsServer.Errors.Item(new Decimal(1));
             globalVariables.gvWOError = error.ErrorMessage;

             return false;

Then to create the work order, I have the following:

if (wo.createDriveUpWO(woDesc, globalVariables.loginUserEmpNo, woType, "35", compCode, equipNo, vehicleNo, workGroup, maintType, workDescriptor, planStartDate))
    error = null;
    globalVariables.gvWOError = "";
    proceed = true;
    error = "Error Creating Work Order for Equipment #" + equipNo;
    MessageBox.Show(error, "Work Order Creation Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    proceed = false;

I hope this helped you.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close