예제 #1
0
        /// <summary>
        /// 编辑或者复制其它发货单
        /// </summary>
        /// <param name="HandleType"></param>
        /// <param name="state"></param>
        private void EditOrCopyMethod(string HandleType, WindowStatus state)
        {
            try
            {
                string        ShippingBillID     = string.Empty;
                List <string> ShippingBillIDList = GetSelectedRecord();//获取要编辑或复制的其它发货单记录行

                if (ShippingBillIDList.Count == 0 && gvShippingBillList.SelectedRows.Count == 0)
                {
                    MessageBoxEx.Show("请选择要" + HandleType + "的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
                else if (ShippingBillIDList.Count > 1 && gvShippingBillList.SelectedRows.Count > 1)
                {
                    MessageBoxEx.Show("一次只能" + HandleType + "一条数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
                else
                {
                    if (ShippingBillIDList.Count == 1)
                    {
                        ShippingBillID = ShippingBillIDList[0].ToString();
                    }
                    else if (gvShippingBillList.SelectedRows.Count == 1)
                    {
                        ShippingBillID = gvShippingBillList.CurrentRow.Cells["ShipId"].ToString();
                    }
                    UCStockShippingAddOrEdit UCShippingBillHandle = new UCStockShippingAddOrEdit(state, ShippingBillID, this);
                    base.addUserControl(UCShippingBillHandle, "其它发货单-" + HandleType, "UCShippingBillHandle", 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 ShippingBillID = string.Empty;
                List<string> ShippingBillIDList = GetSelectedRecord();//获取要编辑或复制的其它发货单记录行

                if (ShippingBillIDList.Count == 0 && gvShippingBillList.SelectedRows.Count==0)
                {
                    MessageBoxEx.Show("请选择要" + HandleType + "的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
                else if (ShippingBillIDList.Count > 1 && gvShippingBillList.SelectedRows.Count >1)
                {
                    MessageBoxEx.Show("一次只能" + HandleType + "一条数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
                else
                {
                    if (ShippingBillIDList.Count == 1)
                    {
                        ShippingBillID = ShippingBillIDList[0].ToString();
                    }
                    else if (gvShippingBillList.SelectedRows.Count == 1)
                    {
                        ShippingBillID = gvShippingBillList.CurrentRow.Cells["ShipId"].ToString();
                    }
                    UCStockShippingAddOrEdit UCShippingBillHandle = new UCStockShippingAddOrEdit(state, ShippingBillID, this);
                    base.addUserControl(UCShippingBillHandle, "其它发货单-" + HandleType, "UCShippingBillHandle", this.Tag.ToString(), this.Name);
                }
            }
            catch (Exception ex)
            {
                 MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }
 /// <summary>
 /// 添加其它发货单
 /// </summary>
 /// <param name="send"></param>
 /// <param name="e"></param>
 private void UCStockShippingManager_AddEvent(object send, EventArgs e)
 {
     UCStockShippingAddOrEdit UCShippingBillAdd = new UCStockShippingAddOrEdit(WindowStatus.Add, null, this);
     base.addUserControl(UCShippingBillAdd, "其它发货单-添加", "UCShippingBillAdd", this.Tag.ToString(), this.Name);
 }
예제 #4
0
        /// <summary>
        /// 添加其它发货单
        /// </summary>
        /// <param name="send"></param>
        /// <param name="e"></param>
        private void UCStockShippingManager_AddEvent(object send, EventArgs e)
        {
            UCStockShippingAddOrEdit UCShippingBillAdd = new UCStockShippingAddOrEdit(WindowStatus.Add, null, this);

            base.addUserControl(UCShippingBillAdd, "其它发货单-添加", "UCShippingBillAdd", this.Tag.ToString(), this.Name);
        }