예제 #1
0
        public AjaxResult GetProdSale([FromBody] dynamic Json)
        {
            trc_roll_prodcut.ExeProc();//执行钢坯/线材库存类型

            Prod_Sale_Dto dto = new Prod_Sale_Dto();

            #region                  //参数

            string date = Json.date; //日期
            #endregion

            #region//数据操作
            AjaxResult result = new AjaxResult();
            result.Code      = DoResult.Success;
            dto.ProdSlabList = DataTableToList(trc_roll_prodcut.GetProdSlab(date).Tables[0]);
            dto.ProdRollList = DataTableToList(trc_roll_prodcut.GetProdRoll(date).Tables[0]);
            dto.SaleShipList = DataTableToList2(trc_roll_prodcut.GetSaleShip(date).Tables[0]);
            dto.SaleRollList = DataTableToList(trc_roll_prodcut.GetSaleRoll(date).Tables[0]);
            dto.SaleSlabList = DataTableToList3(trc_roll_prodcut.GetSaleSlab(date).Tables[0]);
            result.Result    = JsonConvert.SerializeObject(dto);

            #endregion


            return(result);
        }
예제 #2
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                Mod_TMD_HY_PLAN mod = new Mod_TMD_HY_PLAN();

                if (string.IsNullOrEmpty(ltlID.Text))
                {
                    Bll_TRC_ROLL_PRODCUT trc_roll_prodcut = new Bll_TRC_ROLL_PRODCUT();
                    trc_roll_prodcut.ExeProc();//执行钢坯/线材库存类型
                }

                mod.C_TYPE     = ltlID.Text == "" ? "N" : "Y";
                mod.C_REMARK   = txtRemark.Text;
                mod.C_EMP_NAME = ltlEmpName.Text;
                mod.D_DT       = Convert.ToDateTime(txtStart.Value);
                mod.C_ID       = ltlID.Text;
                if (tmd_hy_plan.Insert_Update(mod))
                {
                    WebMsg.MessageBox("保存成功");
                    GetList();
                }
            }
            catch (Exception ex)
            {
                WebMsg.MessageBox(ex.Message);
            }
        }