Exemplo n.º 1
0
        /// <summary>
        /// 删除
        /// </summary>
        public override void EntityDelete()
        {
            FabricProcessRule rule   = new FabricProcessRule();
            FabricProcess     entity = EntityGet();

            rule.RDelete(entity);
        }
        /// <summary>
        /// 撤销提交
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override void btnSubmitCancel_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FCommon.RightCheck(this.FormID, this.RightFormID, this.FormListAID, this.FormListBID, RightSub.新增))
                {
                    this.ShowMessage("你没有此操作权限");
                    return;
                }
                if (HTDataID == 0)
                {
                    this.ShowMessage("请选择要操作的记录");
                    return;
                }

                FabricProcessRule rule = new FabricProcessRule();
                rule.RSubmit(HTDataID, (int)ConfirmFlag.未提交);

                FCommon.AddDBLog(this.Text, FormStatus.撤消提交.ToString(), "ID:" + HTDataID, "");
                this.SetPosStatus(HTDataID);
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 绑定Grid
        /// </summary>
        public override void BindGrid()
        {
            FabricProcessRule rule = new FabricProcessRule();

            gridView1.GridControl.DataSource = rule.RShowDts(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "0 SelectFlag"));
            gridView1.GridControl.Show();
        }
Exemplo n.º 4
0
        /// <summary>
        /// 绑定Grid
        /// </summary>
        public override void BindGrid()
        {
            FabricProcessRule rule = new FabricProcessRule();
            DataTable         dt   = rule.RShowDts(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "0 SelectFlag").Replace("OrderStepName", "'' OrderStepName"));

            ProcDt(dt);
            gridView1.GridControl.DataSource = dt;
            gridView1.GridControl.Show();
        }
Exemplo n.º 5
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         FabricProcessRule rule   = new FabricProcessRule();
         FabricProcess     entity = new FabricProcess();
         entity.ID = HTID;
         entity.SelectByID();
         rule.RDelete(entity);
         this.Close();
     }
     catch (Exception E)
     {
         this.ShowMessage(E.Message);
     }
 }
Exemplo n.º 6
0
        /// <summary>
        /// 绑定Grid
        /// </summary>
        public override void BindGrid()
        {
            FabricProcessRule rule = new FabricProcessRule();
            DataTable         dt   = rule.RShowDts(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("FormStatusName", "'' FormStatusName"));

            ItemBuyStatusProc.ProcColorStatusName(dt);
            ProcDataSourceQty(dt);
            gridView1.GridControl.DataSource = dt;
            gridView1.GridControl.Show();

            string sql = "SELECT distinct ID  FROM UV1_WO_FabricProcessDts WHERE 1=1";

            sql         += HTDataConditionStr;
            dt           = SysUtils.Fill(sql);
            lbCount.Text = "加工单数:" + dt.Rows.Count.ToString();
        }
Exemplo n.º 7
0
        /// <summary>
        /// 修改
        /// </summary>
        public override void EntityUpdate()
        {
            FabricProcessRule rule   = new FabricProcessRule();
            FabricProcess     entity = EntityGet();

            FabricProcessDts[] entitydts   = EntityDtsGet();
            decimal            totalqty    = 0;
            decimal            totalAmount = 0;

            for (int i = 0; i < entitydts.Length; i++)
            {
                totalqty    += SysConvert.ToDecimal(entitydts[i].Qty);
                totalAmount += SysConvert.ToDecimal(entitydts[i].Amount);
            }
            entity.TotalQty    = totalqty;
            entity.TotalAmount = totalAmount;
            entity.SubmitFlag  = this.HTSubmitFlagUpdateGet();
            rule.RUpdate(entity, entitydts);
        }
Exemplo n.º 8
0
        /// <summary>
        /// 新增
        /// </summary>
        public int EntityAdd()
        {
            FabricProcessRule rule   = new FabricProcessRule();
            FabricProcess     entity = EntityGet();

            FabricProcessDts[] entitydts   = EntityDtsGet();
            decimal            totalqty    = 0;
            decimal            totalAmount = 0;

            for (int i = 0; i < entitydts.Length; i++)
            {
                totalqty    += SysConvert.ToDecimal(entitydts[i].Qty);
                totalAmount += SysConvert.ToDecimal(entitydts[i].Amount);
            }
            entity.TotalQty    = totalqty;
            entity.TotalAmount = totalAmount;
            entity.SubmitFlag  = 1;
            rule.RAdd(entity, entitydts);
            return(entity.ID);
        }