Ejemplo n.º 1
0
        /// <summary>
        /// 数据绑定
        /// </summary>
        private void DataBind()
        {
            //获取采购目录查询数据集
            OrdStockUpDt = OrdStockUpBLL.GetInstance().GetStockUpList(CurrentUser);
            //排序
            OrdStockUpDt.DefaultView.Sort = " CREATE_DATE DESC";

            this.bindingSource1.DataSource = OrdStockUpDt.DefaultView;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 初始化显示信息
        /// </summary>
        /// <param name="strStockUpID"></param>
        private void IniData(string strStockUpID)
        {
            ordStockUpModel = OrdStockUpBLL.GetInstance().GetOrdStockUpModel(strStockUpID);

            if (ordStockUpModel != null)
            {
                this.labCode.Text           = ordStockUpModel.Code;
                this.labCreateUserName.Text = ordStockUpModel.Create_User_Name;
                this.labStateName.Text      = ordStockUpModel.State_Name;
                this.labSenderName.Text     = ordStockUpModel.Sender_Name;
                this.labSendDate.Text       = ordStockUpModel.Create_Date;
                this.labStateName.Text      = ordStockUpModel.State_Name;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 作废事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnCancel_Click(object sender, EventArgs e)
        {
            //判断是否为空数据集
            if (this.gVStockUp.RowCount == 0)
            {
                return;
            }

            //备货单状态
            string strState = GetGridViewColValue(this.gVStockUp, "STATE");

            if (strState.Equals("4") || strState.Equals("6"))
            {
                XtraMessageBox.Show("备货确认已经完成,不能进行作废操作!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            //提示信息
            if (XtraMessageBox.Show("确认是否作废?", Constant.MsgTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
            {
                return;
            }

            string strStockUpID = GetGridViewColValue(this.gVStockUp, "ID");

            //设置作废
            try
            {
                OrdStockUpBLL.GetInstance().SetOrdStockUpState(strStockUpID, "4", "4");
                RefreshDt(strStockUpID);
                XtraMessageBox.Show("备货单作废成功!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show("备货单作废失败!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }