Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Batch Management

Example

  • Last UpdatedAug 18, 2016
  • 1 minute read

The following sample C# code illustrates how to define, query, and use the wwMaterialCLB object. The example search for the Lot_123 of the Vinegar material in the BulkTk1 unit and changes the quantity.

private void GetMaterials(object sender, EventArgs e)

{

wwMaterial Materials;

wwMaterialDBClass mdbc = new wwMaterialDBClass();

wwRecipeClass rc = new wwRecipeClass(); mdbc.QueryMaterialsByType(wwMtrlTypeEnum.wwTypeIngredient); mdbc.QueryMaterialsById(MaterialLsv.SelectedItem.ToString());

//mdbc.QueryMaterialsById(MaterialIdTxt.Text);

mats = (wwMaterials)mdbc.Materials;

Materials = (wwMaterial)mats.Item(1);

MaterialIdTxt.Text = Materials.Id;

MaterialNameTxt.Text = Materials.Name;

short typeval = Materials.Type;

UnitOfMeasureTxt.Text = rc.GetMaterialDBUofM(Materials.Id);

HighDevTxt.Text = Materials.HiDev.ToString();

LowDevTxt.Text = Materials.LoDev.ToString();

MaterialDecriptionTxt.Text = Materials.Description;

}

TitleResults for “How to create a CRG?”Also Available in