Beispiel #1
0
        public JsonResult saveAccessLevel(CUser model)
        {
            string message    = "";
            string ErrMessage = "";
            int    ErrCode    = 0;
            string AnvID      = "";

            if (Session["ident"] == null)
            {
                message = "identError";
            }
            if (message == "")
            {
                string             ident = Session["ident"].ToString();
                SmServ.ReparatorCL rep   = new SmServ.ReparatorCL();
                rep.AnvID       = model.AnvID;
                rep.gasketLevel = model.gasketLevel;
                SmServ.SmServClient servCl = new SmServ.SmServClient();
                rep        = servCl.saveGasketLevel(ident, rep);
                ErrMessage = rep.ErrMessage;
                ErrCode    = rep.ErrCode;
                AnvID      = rep.AnvID;
            }
            return(Json(new
            {
                message = message,
                errMessage = ErrMessage,
                errCode = ErrCode.ToString(),
                AnvID = AnvID
            }, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            SmServ.SmServClient s = new SmServ.SmServClient();

            SmServ.ReparatorCL r = s.getReparator(textBox4.Text);

            if (r != null)
            {
                label5.Text = r.AnvID;
                label6.Text = r.Reparator;
                label7.Text = r.RepKatID;
                if (r.ErrMessage != "")
                {
                    label7.Text = r.ErrMessage;
                }
            }
            else
            {
                label5.Text = "Användaren finns ej";
            }
        }