Esempio n. 1
0
 /// <summary>
 /// 盘点单编辑或复制
 /// </summary>
 /// <param name="HandleType"></param>
 /// <param name="state"></param>
 private void EditOrCopyMethod(string HandleType, WindowStatus state)
 {
     try
     {
         string        CheckId    = string.Empty;
         List <string> BillIDlist = GetSelectedRecord();//获取复制的其它收货单记录
         if (BillIDlist.Count == 0 && gvCheckBillList.SelectedRows.Count == 0)
         {
             MessageBoxEx.Show("请选择要" + HandleType + "的数据!");
             return;
         }
         else if (BillIDlist.Count > 1 && gvCheckBillList.SelectedRows.Count > 1)
         {
             MessageBoxEx.Show("一次只能" + HandleType + "一条数据!");
             return;
         }
         else
         {
             if (BillIDlist.Count == 1)
             {
                 CheckId = BillIDlist[0].ToString();
             }
             else if (gvCheckBillList.SelectedRows.Count == 1)
             {
                 CheckId = gvCheckBillList.CurrentRow.Cells["ChkId"].ToString();
             }
             UCStockCheckAddOrEdit UCCheckBillHandle = new UCStockCheckAddOrEdit(state, CheckId, this);
             base.addUserControl(UCCheckBillHandle, "盘点单-" + HandleType, "UCCheckBillHandle" + CheckId, this.Tag.ToString(), this.Name);
         }
     }
     catch (Exception ex)
     {
         MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
     }
 }
 /// <summary>
 /// 盘点单编辑或复制
 /// </summary>
 /// <param name="HandleType"></param>
 /// <param name="state"></param>
 private void EditOrCopyMethod(string HandleType, WindowStatus state)
 {
     try
     {
         string CheckId = string.Empty;
         List<string> BillIDlist = GetSelectedRecord();//获取复制的其它收货单记录
         if (BillIDlist.Count == 0 && gvCheckBillList.SelectedRows.Count == 0)
         {
             MessageBoxEx.Show("请选择要" + HandleType + "的数据!");
             return;
         }
         else if (BillIDlist.Count > 1 && gvCheckBillList.SelectedRows.Count > 1)
         {
             MessageBoxEx.Show("一次只能" + HandleType + "一条数据!");
             return;
         }
         else 
         {
             if (BillIDlist.Count == 1)
             {
                 CheckId = BillIDlist[0].ToString();
             }
             else if (gvCheckBillList.SelectedRows.Count == 1)
             {
                 CheckId = gvCheckBillList.CurrentRow.Cells["ChkId"].ToString();
             }
             UCStockCheckAddOrEdit UCCheckBillHandle = new UCStockCheckAddOrEdit(state, CheckId, this);
             base.addUserControl(UCCheckBillHandle, "盘点单-" + HandleType, "UCCheckBillHandle" + CheckId, this.Tag.ToString(), this.Name);
         }
     }
     catch (Exception ex)
     {
         MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// 添加盘点单
        /// </summary>
        /// <param name="send"></param>
        /// <param name="e"></param>
        private void UCStockCheckManager_AddEvent(object send, EventArgs e)
        {
            UCStockCheckAddOrEdit UCCheckBillAdd = new UCStockCheckAddOrEdit(WindowStatus.Add, null, this);

            base.addUserControl(UCCheckBillAdd, "盘点单-添加", "UCCheckBillAdd", this.Tag.ToString(), this.Name);
        }
 /// <summary>
 /// 添加盘点单
 /// </summary>
 /// <param name="send"></param>
 /// <param name="e"></param>
 private void UCStockCheckManager_AddEvent(object send, EventArgs e)
 {
     UCStockCheckAddOrEdit UCCheckBillAdd = new UCStockCheckAddOrEdit(WindowStatus.Add, null, this);
     base.addUserControl(UCCheckBillAdd, "盘点单-添加", "UCCheckBillAdd", this.Tag.ToString(), this.Name);
 }