Exemple #1
0
        private void btnDeleteWHPic_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtWHPicIDP.Text.Trim() == "")
                {
                    this.ShowMessage("请选择要删除的记录");
                    return;
                }
                if (DialogResult.Yes != this.ShowConfirmMessage("确定要删除本记录?"))
                {
                    return;
                }

                WHPicRule rule   = new WHPicRule();
                WHPic     entity = new WHPic();
                entity.MainID  = HTDataID;
                entity.WHPicID = txtWHPicIDP.Text.Trim();

                rule.RDelete(entity);

                FCommon.AddDBLog(this.Text, "区分类删除", "ID:" + entity.WHPicID, "");
                BindGridWHPic();
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }
Exemple #2
0
        private void btnUpdateWHPic_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtWHPicIDP.Text.Trim() == "")
                {
                    this.ShowMessage("请输入区分类");
                    txtWHPicIDP.Focus();
                    return;
                }
                WHPicRule rule   = new WHPicRule();
                WHPic     entity = this.GetEntityWHPic();
                rule.RUpdate(entity);

                FCommon.AddDBLog(this.Text, "区分类更新", "ID:" + entity.WHPicID, "新ID:" + entity.WHPicID);

                BindGridWHPic();

                ProcessGrid.GridViewFocus(gridView2, new string[1] {
                    "WHPicID"
                }, new string[1] {
                    entity.WHPicID
                });
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }
Exemple #3
0
        /// <summary>
        /// 绑定仓库区分类
        /// </summary>
        private void BindGridWHPic()
        {
            WHPicRule rule = new WHPicRule();

            gridView2.GridControl.DataSource = rule.RShow(" AND MainID=" + SysString.ToDBString(HTDataID), ProcessGrid.GetQueryField(gridView2));
            gridView2.GridControl.Show();

            txtWHID_EditValueChanged(null, null);
        }