本文整理汇总了C#中Part.GetList方法的典型用法代码示例。如果您正苦于以下问题:C# Part.GetList方法的具体用法?C# Part.GetList怎么用?C# Part.GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Part
的用法示例。
在下文中一共展示了Part.GetList方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateDescField
private void UpdateDescField()
{
try
{
Part Part = new Part(DataList.EpicConn);
PartListDataSet PartList = new PartListDataSet();
string WhereClause = "PartNum = '" + partnum_txt.Text + "'";
int pagesize = 1;
bool morePages;
PartList = Part.GetList(WhereClause, pagesize, 0, out morePages);
DataList.EpicClose();
desc_txt.Text = PartList.Tables[0].Rows[0]["PartDescription"].ToString();
Part = null;
PartList.Dispose();
PartList = null;
}
catch { desc_txt.Text = ""; }
}
示例2: SearchBtn_Click
private void SearchBtn_Click(object sender, EventArgs e)
{
Part Part = new Part(DataList.EpicConn);
PartListDataSet PartList = new PartListDataSet();
string WhereClause = PartNo() + Desc() + OfType() + Activity() + OnHold() + NonStock() + TrackLots() + SortBy();
int pageSize;
if (Properties.Settings.Default.allresults)
pageSize = 0;
else
pageSize = Properties.Settings.Default.linelimit;
bool morePages;
PartList = Part.GetList(WhereClause, pageSize, 0, out morePages);
DataList.EpicClose();
SearchResultGrid.AutoGenerateColumns = false;
SearchResultGrid.DataSource = PartList.Tables[0];
if (PartList.Tables[0].Rows.Count < 1)
SearchResultGrid.DataSource = "";
}
示例3: PartTimer_Tick
private void PartTimer_Tick(object sender, EventArgs e)
{
if (DataList.PartExists(partnum_txt.Text))
{
try
{
UpdateDescField();
EngWBDS.Tables["ECOMtl"].Rows[BillDataGrid.CurrentCellAddress.Y]["MtlPartNum"] = partnum_txt.Text;
EngWBDS.Tables["ECOMtl"].Rows[BillDataGrid.CurrentCellAddress.Y]["MtlPartNumPartDescription"] = desc_txt.Text;
//Update UOM list
try
{
DataTable ds = DataList.PartUOM(partnum_txt.Text);
uom_cbo.DataSource = ds;
uom_cbo.DisplayMember = "UOMCode";
uom_cbo.ValueMember = "UOMCode";
uom_cbo.Text = DataList.PartIUM(partnum_txt.Text);
EngWBDS.Tables["ECOMtl"].Rows[BillDataGrid.CurrentCellAddress.Y]["UOMCode"] = uom_cbo.Text;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Could not retrieve UOM for this part number");
}
Part part = new Part(DataList.EpicConn);
bool morePages;
PartListDataSet Pdata = part.GetList("PartNum >= '" + partnum_txt.Text + "'", 100, 0, out morePages);
string Type = Pdata.Tables[0].Rows[0]["TypeCode"].ToString();
ViewAsAsm_chk.Checked = (Type == "M");
EngWBDS.Tables["ECOMtl"].Rows[BillDataGrid.CurrentCellAddress.Y]["ViewAsAsm"] = ViewAsAsm_chk.Checked;
bool PullAsAssy = false;
bool.TryParse(Pdata.Tables[0].Rows[0]["PhantomBOM"].ToString(), out PullAsAssy);
PullAsAsm_chk.Checked = PullAsAssy;
EngWBDS.Tables["ECOMtl"].Rows[BillDataGrid.CurrentCellAddress.Y]["PullAsAsm"] = PullAsAsm_chk.Checked;
if (desc_txt.Text.Contains("COIL") || desc_txt.Text.Contains("SHEET"))
{
try
{
Item_SheetFactor Sheet = new Item_SheetFactor(qty_num.Value, partnum_txt.Text);
//if you don't shut it off before the dialog it keeps popping up
PartTimer.Enabled = false;
Sheet.ShowDialog();
qty_num.Value = Sheet.FactoredWeight;
EngWBDS.Tables["ECOMtl"].Rows[BillDataGrid.CurrentCellAddress.Y]["QtyPer"] = qty_num.Value;
}
catch (Exception ex)
{ MessageBox.Show(ex.Message); }
}
}
catch { desc_txt.Text = ""; }
}
PartTimer.Enabled = false;
}
示例4: UpdateParentRev
private void UpdateParentRev()
{
Part Part = new Part(DataList.EpicConn);
PartListDataSet PartList = new PartListDataSet();
string WhereClause = "PartNum = '" + parent_txt.Text + "'";
int pagesize = 1;
bool morePages;
PartList = Part.GetList(WhereClause, pagesize, 0, out morePages);
DataList.EpicClose();
parentrev_txt.Text = PartList.Tables[0].Rows[0]["PartRevision"].ToString();
Part = null;
PartList.Dispose();
PartList = null;
}
示例5: PartSearchDataSet
/// <summary>
/// Search Function for retrieving Part lists
/// </summary>
/// <param name="WhereStatement">Equivalent to the SQL WHERE function; Leave blank for all possiblities</param>
/// <returns>Dataset of parts meeting the WhereStatement criteria</returns>
public PartDataSet PartSearchDataSet(string WhereStatement)
{
Part Part = new Part(EpicConn);
bool More;
DataSet dss = ((DataSet)Part.GetList(WhereStatement, 0, 0, out More));
PartDataSet ds = (PartDataSet)dss;
EpicClose();
return ds;
}
示例6: UpdateParentDesc
private string UpdateParentDesc()
{
Part Part = new Part(DataList.EpicConn);
PartListDataSet PartList = new PartListDataSet();
string WhereClause = "PartNum = '" + partnumber_txt.Text + "'";
int pagesize = 1;
bool morePages;
PartList = Part.GetList(WhereClause, pagesize, 0, out morePages);
DataList.EpicClose();
string desc = PartList.Tables[0].Rows[0]["PartDescription"].ToString();
Part = null;
PartList.Dispose();
PartList = null;
return desc;
}