protected void btnSave_Click(object sender, EventArgs e)
        {
            string      msg            = "";
            BLLEmployee objbllEmployee = new BLLEmployee();
            ATTEmployee objEmployee    = new ATTEmployee();

            objEmployee.EmpID      = int.Parse(txtEmpID.Text.ToString());
            objEmployee.EmpName    = TextBox0.Text;
            objEmployee.EmpEmail   = TextBox1.Text;
            objEmployee.EmpAddress = TextBox2.Text;
            objEmployee.EmpPhone   = TextBox3.Text;

            if (lblAction.Text == "E")
            {
                objEmployee.Action = "E";
            }
            else
            {
                objEmployee.Action = "A";
            }

            msg         = objbllEmployee.SaveEmployee(objEmployee);
            lblmsg.Text = msg;

            txtEmpID.Text         = "";
            TextBox0.Text         = "";
            TextBox1.Text         = "";
            TextBox2.Text         = "";
            TextBox3.Text         = "";
            lblmsg.Text           = "";
            lblAction.Text        = "";
            lblStatusMessage.Text = "";
        }
Example #2
0
        public object SaveEmployee(string args)
        {
            JsonResponse response = new JsonResponse();
            ATTEmployee  objATT   = JsonUtility.DeSerialize(args, typeof(ATTEmployee)) as ATTEmployee;
            BLLEmployee  bllObj   = new BLLEmployee();

            response = bllObj.SaveEmployee(objATT);
            return(JsonUtility.Serialize(response));
        }