当前位置: 首页>>代码示例>>C#>>正文


C# Part.ChangePartSNBaseDataType方法代码示例

本文整理汇总了C#中Part.ChangePartSNBaseDataType方法的典型用法代码示例。如果您正苦于以下问题:C# Part.ChangePartSNBaseDataType方法的具体用法?C# Part.ChangePartSNBaseDataType怎么用?C# Part.ChangePartSNBaseDataType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Part的用法示例。


在下文中一共展示了Part.ChangePartSNBaseDataType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateDataSet

        private PartDataSet UpdateDataSet(PartDataSet Pdata, DataViewRowState RowState)
        {
            Part Part = new Part(DataList.EpicConn);

            DataList.AddDatum(Pdata, "Part", 0, "PartDescription", Description_txt.Text,RowState);

            if (RowState == DataViewRowState.Unchanged)
                RowState = DataViewRowState.ModifiedCurrent;

            //SearchWord has 8 character limit
            if (Description_txt.Text.Length > 8)
                DataList.AddDatum(Pdata, "Part", 0, "SearchWord", Description_txt.Text.Substring(0, 8), RowState);
            else
                DataList.AddDatum(Pdata, "Part", 0, "SearchWord", Description_txt.Text, RowState);

            DataList.AddDatum(Pdata, "Part", 0, "NetWeight", NetWeight.Text, RowState);

            DataList.AddDatum(Pdata, "Part", 0, "NetWeightUOM", uomweight_cbo.SelectedValue.ToString(), RowState);

            DataList.AddDatum(Pdata, "Part", 0, "IUM", uom_cbo.SelectedValue.ToString(), RowState);

            DataList.AddDatum(Pdata, "Part", 0, "ClassID", class_cbo.SelectedValue.ToString(), RowState);

            DataList.AddDatum(Pdata, "Part", 0, "QtyBearing", qtybearing.Checked.ToString(), RowState);

            DataList.AddDatum(Pdata, "Part", 0, "UsePartRev", userevision.Checked.ToString(), RowState);

            DataList.AddDatum(Pdata, "Part", 0, "PhantomBOM", phantom_chk.Checked.ToString(), RowState);

            string Type_Code = type_cbo.SelectedItem.ToString();

            Part.ChangePartTypeCode(Type_Code, Pdata);

            Part.ChangePartProdCode(group_cbo.SelectedValue.ToString(), Pdata);

            //add trackserial number if necessary
            if (trackserial.Checked && (SerialPrefix != "" || SerialPrefix != null))
            {
                if (SerialPrefix == "" || SerialPrefix == null)
                    MessageBox.Show("Cannot use null serial prefix.  Set the prefix or uncheck 'Track Serial Number'", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                else
                {
                    DataList.AddDatum(Pdata, "Part", 0, "EnableSerialNum", trackserial.Checked.ToString(), RowState);

                    DataList.AddDatum(Pdata, "Part", 0, "TrackSerialNum", trackserial.Checked.ToString(), RowState);

                    Part.ChangePartSNBaseDataType("MASK", Pdata);

                    Part.ChangeSNMask(SerialMask, Pdata);

                    Part.ChangePartSNMaskPrefixSuffix(SerialPrefix, "", Pdata);
                }
            }

            return Pdata;
        }
开发者ID:virall,项目名称:EpicorIntegration,代码行数:56,代码来源:Item_Master.cs

示例2: savebtn_Click


//.........这里部分代码省略.........
                        Part.Update(Pdata);
                    }
                    catch (Exception ex) { System.Diagnostics.Debug.Print(ex.Message); }

                    if (trackserial.Checked)
                    {
                        Pdata = Part.GetByID(PartNumber);

                        try
                        {
                            Part.ChangePartTrackSerialNum(trackserial.Checked, Pdata);
                        }
                        catch
                        {
                            //If the neat process fails, do it the hard way.

                            DataList.UpdateDatum(Pdata, "Part", 0, "TrackSerialNum", true.ToString());

                            DataList.UpdateDatum(Pdata, "Part", 0, "UseMaskSeq", true.ToString());

                            DataList.UpdateDatum(Pdata, "Part", 0, "SNLastUsedSeq", "");

                            Part.Update(Pdata);

                            Pdata = Part.GetByID(PartNumber);

                            DataList.UpdateDatum(Pdata, "PartPlant", 0, "EnableSerialNum", true.ToString());

                            DataList.UpdateDatum(Pdata, "PartPlant", 0, "PartTrackSerialNum", true.ToString());

                            try
                            {
                                DataList.UpdateDatum(Pdata, "PartPlant", 0, "PhantomBOM", false.ToString());
                            }
                            catch { }

                            Part.Update(Pdata);

                            Pdata = Part.GetByID(PartNumber);
                        }

                        DataList.UpdateDatum(Pdata, "Part", 0, "UseMaskSeq", true.ToString());
                    }

                    //retrieve the new copy of the data
                    Pdata = Part.GetByID(PartNumber);

                    if (whse_cbo.Items.Count > 0)
                    {
                        Part.Update(Pdata);

                        for (int i = 0; i < whse_cbo.Items.Count; i++)
                        {
                            whse_cbo.SelectedIndex = i;

                            DataList.UpdateDatum(Pdata, "PartPlant", 0, "PrimWhse", whse_cbo.SelectedValue.ToString());

                            DataList.UpdateDatum(Pdata, "PartPlant", 0, "PrimWhseDescription", whse_cbo.Text);

                            DataList.UpdateDatum(Pdata, "PartPlant", 0, "DBRowIdent", null);

                            //if (trackserial.Checked)

                            DataList.UpdateDatum(Pdata, "PartPlant", 0, "PartTrackSerialNum", trackserial.Checked.ToString());
                        }

                        if (trackserial.Checked)
                        {
                            Part.ChangePartSNBaseDataType("MASK", Pdata);

                            Part.ChangeSNMask(SerialMask, Pdata);
                        }

                        Part.Update(Pdata);

                        DataList.UpdateDatum(Pdata, "PartPlant", 0, "BackFlush", bflush_chk.Checked.ToString());

                        if (planner_cbo.Enabled)
                        {
                            DataList.UpdateDatum(Pdata, "PartPlant", 0, "PersonID", planner_cbo.Text);

                            DataList.UpdateDatum(Pdata, "PartPlant", 0, "PersonName", planner_cbo.Text);
                        }

                        //Update with warehouse information
                        Part.Update(Pdata);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                }
                finally
                {
                    DataList.EpicClose();

                    this.Close();
                }
            }
        }
开发者ID:virall,项目名称:EpicorIntegration,代码行数:101,代码来源:Item_Master.cs


注:本文中的Part.ChangePartSNBaseDataType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。