Beispiel #1
0
        public string UPDATE_PD_GD_BOM(string GDDH, string KSDATE, string JSDATE, string SL, string ISOPEN, string CHARG, string datastring)
        {
            int       STAFFID         = Convert.ToInt32(AppClass.GetSession("STAFFID"));
            string    token           = Session["token"].ToString();
            string    rst             = "";
            MES_PD_GD model_MES_PD_GD = new MES_PD_GD();

            model_MES_PD_GD.GDDH   = GDDH;
            model_MES_PD_GD.KSDATE = KSDATE;
            model_MES_PD_GD.JSDATE = JSDATE;
            model_MES_PD_GD.SL     = Convert.ToDecimal(SL);
            model_MES_PD_GD.ISOPEN = Convert.ToInt32(ISOPEN);
            model_MES_PD_GD.JLR    = STAFFID;
            model_MES_PD_GD.CHARG  = CHARG;
            MES_RETURN_UI rst_MES_RETURN_UI = mesModels.PD_GD.UPDATE(model_MES_PD_GD, token);

            if (rst_MES_RETURN_UI.TYPE == "S")
            {
                MES_PD_GD_BOM[] model_MES_PD_GD_BOM        = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_PD_GD_BOM[]>(datastring);
                MES_PD_GD_BOM   model_MES_PD_GD_BOM_delete = new MES_PD_GD_BOM();
                model_MES_PD_GD_BOM_delete.GDDH = GDDH;
                mesModels.PD_GD_BOM.DELETE_GDDH(model_MES_PD_GD_BOM_delete, token);
                for (int i = 0; i < model_MES_PD_GD_BOM.Length; i++)
                {
                    model_MES_PD_GD_BOM[i].GDDH = GDDH;
                    mesModels.PD_GD_BOM.INSERT(model_MES_PD_GD_BOM[i], token);
                }
            }
            rst = Newtonsoft.Json.JsonConvert.SerializeObject(rst_MES_RETURN_UI);
            return(rst);
        }
Beispiel #2
0
        public MES_RETURN_UI DELETE_GDDH(MES_PD_GD_BOM model, string ptoken)
        {
            MES_RETURN    mr   = client.DELETE(model, 1, ptoken);
            MES_RETURN_UI mrui = new MES_RETURN_UI();

            mrui.TYPE    = mr.TYPE;
            mrui.MESSAGE = mr.MESSAGE;
            return(mrui);
        }
Beispiel #3
0
        public MES_RETURN_UI INSERT(MES_PD_GD_BOM model, string ptoken)
        {
            MES_RETURN    mr   = client.INSERT(model, ptoken);
            MES_RETURN_UI mrui = new MES_RETURN_UI();

            mrui.TYPE    = mr.TYPE;
            mrui.MESSAGE = mr.MESSAGE;
            return(mrui);
        }
Beispiel #4
0
        public string GET_GD_BOM(string datastring)
        {
            string               rst   = "";
            string               token = AppClass.GetSession("token").ToString();
            MES_PD_GD_BOM        model_MES_PD_GD_BOM      = Newtonsoft.Json.JsonConvert.DeserializeObject <MES_PD_GD_BOM>(datastring);
            MES_PD_GD_BOM_SELECT rst_MES_PD_GD_BOM_SELECT = mesModels.PD_GD_BOM.SELECT(model_MES_PD_GD_BOM, token);

            rst = Newtonsoft.Json.JsonConvert.SerializeObject(rst_MES_PD_GD_BOM_SELECT);
            return(rst);
        }
Beispiel #5
0
 public MES_PD_GD_BOM_SELECT SELECT(MES_PD_GD_BOM model, string ptoken)
 {
     return(client.SELECT(model, ptoken));
 }