Example #1
0
        public ActionResult TPM_Manage()
        {
            string token = AppClass.GetSession("token").ToString();

            AppClass.SetSession("location", 201);
            int       STAFFID = Convert.ToInt32(AppClass.GetSession("STAFFID"));
            MES_SY_GC gclist  = new MES_SY_GC();

            gclist.STAFFID = STAFFID;
            MES_SY_GC[] gc       = mesModels.SY_GC.SELECT_BY_ROLE(gclist, token);
            MES_MM_CK   model_ck = new MES_MM_CK();

            model_ck.STAFFID = STAFFID;
            MES_MM_CK_SELECT data_ck  = mesModels.MM_CK.SELECT_BY_STAFFID(model_ck, token);
            MES_SY_TYPEMX    model_gg = new MES_SY_TYPEMX();

            //model_gg.TYPEID = 20;
            MES_SY_TYPEMXLIST[] data_gg = mesModels.SY_TYPEMX.SELECT(model_gg, token);

            MODLEDataGather data = new MODLEDataGather();

            data.Sy_gc            = gc;
            data.MES_MM_CK_SELECT = data_ck;
            data.Sy_typemxlist    = data_gg;
            ViewData.Model        = data;
            return(View());
        }
Example #2
0
        private void gccomboBox_SelectedValueChanged(object sender, EventArgs e)
        {
            ComboBox  cb      = (ComboBox)sender;
            object    obj     = cb.SelectedValue;
            MES_MM_CK ckmodel = new MES_MM_CK();

            if (obj is string)
            {
                ckmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
                ckmodel.GC      = Convert.ToString(gccomboBox.SelectedValue);
            }
            else
            {
            }
            MES_MM_CK_SELECT ckres = ServicModel.MM_CK.SELECT_BY_STAFFID(ckmodel, getToken());

            if (ckres.MES_RETURN.TYPE.Equals("S"))
            {
                for (int i = 0; i < ckres.MES_MM_CK.Length; i++)
                {
                    ckres.MES_MM_CK[i].CKMS = ckres.MES_MM_CK[i].CKDM + "-" + ckres.MES_MM_CK[i].CKMS;
                }
                List <MES_MM_CK> ckList = ckres.MES_MM_CK.ToList();

                MES_MM_CK ckchoise = new MES_MM_CK();
                ckchoise.CKDM = "0";
                ckchoise.CKMS = q(Msg_Type.titlechoice);// "==请选择==";
                ckList.Insert(0, ckchoise);
                kcdfcomboBox.DataSource    = ckList;
                kcdfcomboBox.DisplayMember = "CKMS";
                kcdfcomboBox.ValueMember   = "CKDM";
            }
        }
Example #3
0
        public MES_RETURN_UI UPDATE_SYNC(MES_MM_CK model, string ptoken)
        {
            MES_RETURN    mr   = client.UPDATE_SYNC(model, ptoken);
            MES_RETURN_UI mrui = new MES_RETURN_UI();

            mrui.TYPE    = mr.TYPE;
            mrui.MESSAGE = mr.MESSAGE;
            return(mrui);
        }
Example #4
0
        public string GET_MM_CK(int STAFFID)
        {
            string    token    = AppClass.GetSession("token").ToString();
            MES_MM_CK model_ck = new MES_MM_CK();

            model_ck.STAFFID = STAFFID;
            MES_MM_CK_SELECT data_ck = mesmodels.MM_CK.SELECT_BY_STAFFID(model_ck, token);

            return(Newtonsoft.Json.JsonConvert.SerializeObject(data_ck));
        }
Example #5
0
        public frmWLKC_N(Rigth_Type rtype)
        {
            InitializeComponent();
            List       = new List <ZSL_BCS303_BS>();
            ChoiceList = new List <ZSL_BCS303_BS>();
            //monthCalendar1.Visible = false;
            //monthCalendar2.Visible = false;
            RigthType = rtype;
            MES_SY_GC gcmodel = new MES_SY_GC();

            JLdataGridView.AutoGenerateColumns = false;
            gcmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
            List <MES_SY_GC> gcList = ServicModel.SY_GC.SELECT_BY_ROLE(gcmodel, getToken()).ToList();

            for (int i = 0; i < gcList.Count; i++)
            {
                gcList[i].GCMS = gcList[i].GC + "-" + gcList[i].GCMS;
            }
            MES_SY_GC gcchoose = new MES_SY_GC();

            gcchoose.GC   = "0";
            gcchoose.GCMS = q(Msg_Type.titlechoice);//"==请选择==";
            gcList.Insert(0, gcchoose);

            gccomboBox.DisplayMember = "GCMS";
            gccomboBox.ValueMember   = "GC";
            gccomboBox.DataSource    = gcList.ToList();

            List <MES_MM_CK> ckList   = new List <MES_MM_CK>();
            MES_MM_CK        ckchoise = new MES_MM_CK();

            ckchoise.CKDM = "0";
            ckchoise.CKMS = q(Msg_Type.titlechoice);//"==请选择==";
            ckList.Add(ckchoise);
            kcdfcomboBox.DataSource    = ckList;
            kcdfcomboBox.DisplayMember = "CKMS";
            kcdfcomboBox.ValueMember   = "CKDM";
            //MES_MM_CK ckmodel = new MES_MM_CK();
            //ckmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
            //ckmodel.GC = Convert.ToString(gccomboBox.SelectedValue);
            //MES_MM_CK_SELECT ckres = ServicModel.MM_CK.SELECT_BY_STAFFID(ckmodel,getToken());
            //if (ckres.MES_RETURN.TYPE.Equals("S"))
            //{
            //    for (int i = 0; i < ckres.MES_MM_CK.Length; i++)
            //    {
            //        ckres.MES_MM_CK[i].CKMS = ckres.MES_MM_CK[i].CKDM + "-" + ckres.MES_MM_CK[i].CKMS;
            //    }
            //    kcdfcomboBox.DataSource = ckres.MES_MM_CK;
            //    kcdfcomboBox.DisplayMember = "CKMS";
            //    kcdfcomboBox.ValueMember = "CKDM";
            //}
            slrqfromdateTimePicker.Text = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
            slrqtodateTimePicker.Text   = DateTime.Now.ToString("yyyy-MM-dd 23:59:59");
        }
        public string Read_KCDD_ByGC(string GC)
        {
            token = appClass.CRM_Gettoken();
            MES_MM_CK cx_kcdd = new MES_MM_CK();

            cx_kcdd.STAFFID = appClass.CRM_GetStaffid();
            cx_kcdd.GC      = GC;
            MES_MM_CK_SELECT KCDD = mesModels.MM_CK.SELECT_USER(cx_kcdd, token);

            return(Newtonsoft.Json.JsonConvert.SerializeObject(KCDD));
        }
Example #7
0
        public string Data_Select_CK_ROLE(string GC)
        {
            int    STAFFID = Convert.ToInt32(AppClass.GetSession("STAFFID"));
            string token   = Session["token"].ToString();

            MES_MM_CK model_ck = new MES_MM_CK();

            model_ck.STAFFID = STAFFID;
            model_ck.GC      = GC;
            MES_MM_CK_SELECT data_ck = mesmodels.MM_CK.SELECT_BY_STAFFID(model_ck, token);
            string           s       = Newtonsoft.Json.JsonConvert.SerializeObject(data_ck);

            return(s);
        }
Example #8
0
        public ActionResult ZS_WLBSKGL_MANAGE()
        {
            TokenINFO rst_TokenINFO = GET_TokenINFO();
            int       STAFFID       = rst_TokenINFO.STAFFID;
            MES_SY_GC gclist        = new MES_SY_GC();

            gclist.STAFFID = STAFFID;
            MES_SY_GC[] gc       = mesmodels.SY_GC.SELECT_BY_ROLE(gclist, rst_TokenINFO.Token);
            MES_MM_CK   model_ck = new MES_MM_CK();

            model_ck.STAFFID = STAFFID;
            MES_MM_CK_SELECT data_ck   = mesmodels.MM_CK.SELECT_BY_STAFFID(model_ck, rst_TokenINFO.Token);
            MODLE_TPM        view_data = new MODLE_TPM();

            view_data.Sy_gc            = gc;
            view_data.MES_MM_CK_SELECT = data_ck;
            ViewData.Model             = view_data;
            return(View());
        }
Example #9
0
        public frmWLKC(Rigth_Type rtype)
        {
            InitializeComponent();
            List       = new List <ZSL_BCS303_BS>();
            ChoiceList = new List <ZSL_BCS303_BS>();
            //monthCalendar1.Visible = false;
            //monthCalendar2.Visible = false;
            RigthType = rtype;
            MES_SY_GC gcmodel = new MES_SY_GC();

            JLdataGridView.AutoGenerateColumns = false;
            gcmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
            MES_SY_GC[] gcList = ServicModel.SY_GC.SELECT_BY_ROLE(gcmodel, getToken());
            for (int i = 0; i < gcList.Length; i++)
            {
                gcList[i].GCMS = gcList[i].GC + "-" + gcList[i].GCMS;
            }
            gccomboBox.DisplayMember = "GCMS";
            gccomboBox.ValueMember   = "GC";
            gccomboBox.DataSource    = gcList;
            MES_MM_CK ckmodel = new MES_MM_CK();

            ckmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
            ckmodel.GC      = getGC("value");
            MES_MM_CK_SELECT ckres = ServicModel.MM_CK.SELECT_BY_STAFFID(ckmodel, getToken());

            if (ckres.MES_RETURN.TYPE.Equals("S"))
            {
                for (int i = 0; i < ckres.MES_MM_CK.Length; i++)
                {
                    ckres.MES_MM_CK[i].CKMS = ckres.MES_MM_CK[i].CKDM + "-" + ckres.MES_MM_CK[i].CKMS;
                }
                kcdfcomboBox.DataSource    = ckres.MES_MM_CK;
                kcdfcomboBox.DisplayMember = "CKMS";
                kcdfcomboBox.ValueMember   = "CKDM";
            }
            //monthCalendar1.Visible = false;
            //monthCalendar2.Visible = false;
            slrqfromdateTimePicker.Text = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
            slrqtodateTimePicker.Text   = DateTime.Now.ToString("yyyy-MM-dd 23:59:59");
        }
Example #10
0
        public string SELECT_BY_ROLE_ASSEMBLE(string WERKS)
        {
            token = appClass.CRM_Gettoken();
            MES_MM_CK model = new MES_MM_CK();

            if (WERKS == "1000")
            {
                model.ROLENAME = "1000-验货仓库";
            }
            else if (WERKS == "4000")
            {
                model.ROLENAME = "4000-验货仓库";
            }
            else
            {
                model.ROLENAME = "1000-验货仓库";
            }

            MES_MM_CK_SELECT data = mesModels.MM_CK.SELECT_BY_ROLE_ASSEMBLE(model, token);

            return(Newtonsoft.Json.JsonConvert.SerializeObject(data));
        }
Example #11
0
 public MES_MM_CK_SELECT SELECT_BY_ROLE_ASSEMBLE(MES_MM_CK model, string ptoken)
 {
     return(client.SELECT_BY_ROLE_ASSEMBLE(model, ptoken));
 }
Example #12
0
 public MES_MM_CK_SELECT SELECT_BY_STAFFID(MES_MM_CK model, string ptoken)
 {
     return(client.SELECT_BY_STAFFID(model, ptoken));
 }
Example #13
0
 public MES_MM_CK_SELECT SELECT_USER(MES_MM_CK model, string ptoken)
 {
     model.ISACTION = 1;
     return(client.SELECT(model, ptoken));
 }
Example #14
0
        public frmSGSMsub(MES_SY_MATERIAL_LIST model)
        {
            InitializeComponent();
            //monthCalendar1.Visible = false;
            //monthCalendar2.Visible = false;
            //monthCalendar3.Visible = false;
            MES_SY_MATERIAL_LIST = model;
            List <MES_SY_TYPEMXLIST> tmsxList = new List <MES_SY_TYPEMXLIST>();

            tmsxList = GetDictionaryMX(16, model.GC).ToList();
            MES_SY_TYPEMXLIST tmsxmodel = new MES_SY_TYPEMXLIST();

            tmsxmodel.MXNAME = q(Msg_Type.titlechoice);//"==请选择==";
            tmsxmodel.ID     = 0;
            tmsxList.Insert(0, tmsxmodel);
            tmsxcomboBox.DataSource    = tmsxList;
            tmsxcomboBox.DisplayMember = "MXNAME";
            tmsxcomboBox.ValueMember   = "ID";
            gctextBox.Text             = model.GC;
            wlxxtextBox.Text           = model.WLH + "/" + model.WLMS;
            wllbtextBox.Text           = model.WLLBNAME;
            wlzxxtextBox.Text          = model.WLGROUP + "/" + model.WLGROUPNAME;
            dcxhtextBox.Text           = model.DCXHNAME;
            dcdjtextBox.Text           = model.DCDJNAME;

            MES_SY_GZZX gzzxmodel = new MES_SY_GZZX();

            gzzxmodel.GC      = model.GC;
            gzzxmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
            //gzzxmodel.WLLB = Gzzxlb;
            //gzzxmodel.WLLBNAME = Wllb;
            MES_SY_GZZX[] list = ServicModel.SY_GZZX.SELECT_BY_ROLE(gzzxmodel, getToken());
            gzzxcomboBox.SelectedValue = "";
            gzzxcomboBox.SelectedText  = "";
            for (int i = 0; i < list.Length; i++)
            {
                list[i].GZZXMS = list[i].GZZXBH + "-" + list[i].GZZXMS;
            }
            List <MES_SY_GZZX> gzzxlist        = list.ToList();
            MES_SY_GZZX        gzzxchoicemodel = new MES_SY_GZZX();

            gzzxchoicemodel.GZZXBH = "0";
            gzzxchoicemodel.GZZXMS = q(Msg_Type.titlechoice);//"==请选择==";
            gzzxlist.Insert(0, gzzxchoicemodel);
            gzzxcomboBox.DataSource    = gzzxlist;
            gzzxcomboBox.ValueMember   = "GZZXBH";
            gzzxcomboBox.DisplayMember = "GZZXMS";

            List <MES_SY_TYPEMXLIST> bclist = GetDictionaryMX(5, model.GC).ToList();

            bclist.Insert(0, tmsxmodel);
            bccomboBox4.DataSource    = bclist;
            bccomboBox4.DisplayMember = "MXNAME";
            bccomboBox4.ValueMember   = "ID";


            List <MES_SY_TYPEMXLIST> cpztlist = GetDictionaryMX(9, model.GC).ToList();

            cpztlist.Insert(0, tmsxmodel);
            cpztcomboBox5.DataSource    = cpztlist;
            cpztcomboBox5.DisplayMember = "MXNAME";
            cpztcomboBox5.ValueMember   = "ID";

            List <MES_SY_TYPEMXLIST> zfcdlist = GetDictionaryMX(10, model.GC).ToList();

            zfcdlist.Insert(0, tmsxmodel);

            zfcdcomboBox.DataSource    = zfcdlist;
            zfcdcomboBox.DisplayMember = "MXNAME";
            zfcdcomboBox.ValueMember   = "ID";



            MES_MM_CK ckmodel = new MES_MM_CK();

            ckmodel.GC = gctextBox.Text.Trim();
            MES_MM_CK_SELECT ckres = ServicModel.MM_CK.SELECT_BY_STAFFID(ckmodel, getToken());

            if (ckres.MES_RETURN.TYPE.Equals("S"))
            {
                for (int i = 0; i < ckres.MES_MM_CK.Length; i++)
                {
                    ckres.MES_MM_CK[i].CKMS = ckres.MES_MM_CK[i].CKDM + "-" + ckres.MES_MM_CK[i].CKMS;
                }
                List <MES_MM_CK> ckddList = new List <MES_MM_CK>();
                ckddList = ckres.MES_MM_CK.ToList();
                MES_MM_CK choiceCKmodel = new MES_MM_CK();
                choiceCKmodel.CKMS = q(Msg_Type.titlechoice);//"==请选择==";
                choiceCKmodel.CKDM = "0";
                ckddList.Insert(0, choiceCKmodel);
                kcddcomboBox.DataSource    = ckddList;
                kcddcomboBox.DisplayMember = "CKMS";
                kcddcomboBox.ValueMember   = "CKDM";
            }
        }