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

            rule.RDelete(entity);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 绑定Grid
        /// </summary>
        public override void BindGrid()
        {
            TowelProductionPlanRule rule = new TowelProductionPlanRule();

            gridView1.GridControl.DataSource = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1));
            gridView1.GridControl.Show();
        }
Ejemplo n.º 3
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"));

            TowelProductionPlanRule rule = new TowelProductionPlanRule();
            DataTable dt = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "0 SelectFlag"));


            gridView1.GridControl.DataSource = dt;
            gridView1.GridControl.Show();
        }
        /// <summary>
        /// 修改
        /// </summary>
        public override void EntityUpdate()
        {
            TowelProductionPlanRule rule   = new TowelProductionPlanRule();
            TowelProductionPlan     entity = EntityGet();

            TowelProductionPlanDts[] entitydts = EntityDtsGet();

            decimal TotalAmount = 0;
            decimal TotalQty    = 0;

            for (int i = 0; i < entitydts.Length; i++)
            {
                TotalAmount += entitydts[i].Amount;
                TotalQty    += entitydts[i].Qty;
            }
            entity.TotalAmount = TotalAmount;
            entity.TotalQty    = TotalQty;

            entity.SubmitFlag = this.HTSubmitFlagUpdateGet();
            rule.RUpdate(entity, entitydts);
        }
        /// <summary>
        /// 新增
        /// </summary>
        public override int EntityAdd()
        {
            TowelProductionPlanRule rule   = new TowelProductionPlanRule();
            TowelProductionPlan     entity = EntityGet();

            TowelProductionPlanDts[] entitydts = EntityDtsGet();


            decimal TotalAmount = 0;
            decimal TotalQty    = 0;

            for (int i = 0; i < entitydts.Length; i++)
            {
                TotalAmount += entitydts[i].Amount;
                TotalQty    += entitydts[i].Qty;
            }
            entity.TotalAmount = TotalAmount;
            entity.TotalQty    = TotalQty;


            entity.SubmitFlag = this.HTSubmitFlagInsertGet();
            rule.RAdd(entity, entitydts);
            return(entity.ID);
        }