Exemplo n.º 1
0
        /// <summary>
        /// 窗体加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmWait_Load(object sender, EventArgs e)
        {
            try
            {
                ProcessGrid.BindGridColumn(gridView1, this.FormID);                         //绑定列
                ProcessGrid.SetGridColumnUI(gridView1, this.FormListAID, this.FormListBID); //设置列UI



                SaleOrder entity = new SaleOrder();
                entity.ID = m_ID;
                entity.SelectByID();

                SaleItemType = Common.GetSaleItemTypeByID(entity.SaleFlowModuleID);



                if (SysConvert.ToBoolean(ProductParamSet.GetIntValueByID(5009)))//面料的坯布启用可替换坯布功能,影响到订单坯布算料、坯布采购、织造等
                {
                }
                else
                {
                    gridView1.Columns["CPItemCode"].Visible = false;
                }
                BindGrid();
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnLoad_Click(object sender, EventArgs e)
        {
            try
            {
                btnLoad.Focus();
                SaleOrder entity = new SaleOrder();
                entity.ID = m_ID;
                entity.SelectByID();
                if (entity.SubmitFlag == 1 || entity.SubmitFlag == 2)
                {
                    this.ShowMessage("订单已提交,不能修改");
                    return;
                }
                SaleOrderFabricCompSiteRule rule      = new SaleOrderFabricCompSiteRule();
                SaleOrderFabricCompSite[]   entityDts = GetEntityDts();
                if (!CheckCorrect(entityDts))
                {
                    return;
                }

                rule.RUpdate(m_ID, m_DID, entityDts);
                BindGrid();
                this.ShowInfoMessage("保存成功,请确认!");
                //this.Close();
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }
Exemplo n.º 3
0
 private void gridView1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
 {
     if (e.Column.FieldName == "HKFlag")
     {
         int RowHandle = e.RowHandle;
         if (SysConvert.ToString(gridView1.GetRowCellValue(e.RowHandle, "HKString")) == "不需要" || SysConvert.ToString(gridView1.GetRowCellValue(e.RowHandle, "HKString")) == "")
         {
             btnQuery_Click(null, null);
             gridView1.FocusedRowHandle = RowHandle;
             return;
         }
         int       ID     = SysConvert.ToInt32(gridView1.GetFocusedRowCellValue("ID"));
         int       HKFlag = SysConvert.ToInt32(gridView1.GetFocusedRowCellValue("HKFlag"));
         SaleOrder entity = new SaleOrder();
         entity.ID = ID;
         entity.SelectByID();
         entity.HKFlag = HKFlag;
         entity.HKDate = DateTime.Now;
         SaleOrderRule rule = new SaleOrderRule();
         rule.RUpdate(entity);
         btnQuery_Click(null, null);
         gridView1.FocusedRowHandle = RowHandle;
     }
     if (e.Column.FieldName == "BGJFlag")
     {
         int RowHandle = e.RowHandle;
         if (SysConvert.ToString(gridView1.GetRowCellValue(e.RowHandle, "BGJString")) == "不需要" || SysConvert.ToString(gridView1.GetRowCellValue(e.RowHandle, "BGJString")) == "")
         {
             btnQuery_Click(null, null);
             gridView1.FocusedRowHandle = RowHandle;
             return;
         }
         int       ID      = SysConvert.ToInt32(gridView1.GetFocusedRowCellValue("ID"));
         int       BGJFlag = SysConvert.ToInt32(gridView1.GetFocusedRowCellValue("BGJFlag"));
         SaleOrder entity  = new SaleOrder();
         entity.ID = ID;
         entity.SelectByID();
         entity.BGJFlag = BGJFlag;
         entity.BGJDate = DateTime.Now;
         SaleOrderRule rule = new SaleOrderRule();
         rule.RUpdate(entity);
         btnQuery_Click(null, null);
         gridView1.FocusedRowHandle = RowHandle;
     }
 }
Exemplo n.º 4
0
        private void btnLoad_Click(object sender, EventArgs e)
        {
            try
            {
                btnLoad.Focus();
                SaleOrder entity = new SaleOrder();
                entity.ID = m_ID;
                entity.SelectByID();
                if (entity.SubmitFlag == 1 || entity.SubmitFlag == 2)
                {
                    this.ShowMessage("订单已提交,不能修改");
                    return;
                }

                SaleOrderItemRule rule      = new SaleOrderItemRule();
                SaleOrderItem[]   entityDts = GetEntityDts();
                decimal           TotalRer  = 0;
                for (int i = 0; i < entityDts.Length; i++)
                {
                    TotalRer += entityDts[i].Per;
                }
                if (TotalRer != 100)
                {
                    this.ShowMessage("纱线的比例合计不为100,请检查!");
                    return;
                }
                if (MessStr != "")
                {
                    this.ShowMessage(MessStr);
                    return;
                }
                rule.RUpdate(m_ID, m_DID, entityDts);
                BindGrid();
                this.ShowInfoMessage("保存成功,请确认!");
                //this.Close();
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }
Exemplo n.º 5
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         SaleOrder entity = new SaleOrder();
         entity.ID = m_ID;
         entity.SelectByID();
         if (entity.SubmitFlag == 1)
         {
             this.ShowMessage("订单已提交,不能修改");
             return;
         }
         this.BaseFocusLabel.Focus();
         int    IID = SysConvert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "ID"));
         string sql = "DELETE Sale_SaleOrderFabric WHERE ID=" + SysString.ToDBString(IID);
         SysUtils.ExecuteNonQuery(sql);
         BindGrid();
     }
     catch (Exception E)
     {
         this.ShowMessage(E.Message);
     }
 }