예제 #1
0
        /// <summary>
        /// 获得码单明细
        /// </summary>
        /// <param name="List"></param>
        private void GetMadanDts(ArrayList List)
        {
            BaseFocusLabel.Focus();
            for (int j = 0; j < gridView1.RowCount; j++)//纱线循环
            {
                if (SysConvert.ToString(gridView1.GetRowCellValue(j, "ItemCode")) != string.Empty)
                {
                    for (int m = 0; m < dtPack[j].Rows.Count; m++)                 //码单循环
                    {
                        if ((SysConvert.ToDecimal(dtPack[j].Rows[m]["Qty"]) != 0)) //dtPack[j].Rows[m]["PackNo"].ToString() != string.Empty ||
                        {
                            IOFormDtsPack entity = new IOFormDtsPack();
                            entity.ID = SysConvert.ToInt32(dtPack[j].Rows[m]["ID"]);
                            entity.SelectByID();
                            entity.MainID = HTDataID;
                            entity.Seq    = j + 1;
                            entity.SubSeq = m + 1;
                            entity.BoxNo  = dtPack[j].Rows[m]["BoxNo"].ToString();
                            entity.Qty    = SysConvert.ToDecimal(dtPack[j].Rows[m]["Qty"]);
                            entity.Remark = SysConvert.ToString(dtPack[j].Rows[m]["Remark"]);


                            List.Add(entity);
                        }
                    }
                }
            }
        }
예제 #2
0
        /// <summary>
        ///保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                for (int i = 0; i < gridView1.RowCount; i++)
                {
                    if (SysConvert.ToString(gridView1.GetRowCellValue(i, "RecordOPID")) != "")
                    {
                        int PackID = SysConvert.ToInt32(gridView1.GetRowCellValue(i, "PackID"));

                        IOFormDtsPackRule rule   = new IOFormDtsPackRule();
                        IOFormDtsPack     entity = new IOFormDtsPack();
                        entity.ID = PackID;
                        entity.SelectByID();

                        entity.RecordOPID = SysConvert.ToString(gridView1.GetRowCellValue(i, "RecordOPID"));
                        if (FormListAID == 1)
                        {
                            entity.RecordType = "打卷";
                        }
                        if (FormListAID == 2)
                        {
                            entity.RecordType = "上布";
                        }

                        rule.RUpdate(entity);
                    }
                }

                this.ShowInfoMessage("保存成功!");
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }