public int personalhygienedata(MPersonalHygieneCheckList receive)
        {
            int result = 0;

            try
            {
                DBParameterCollection paramcollection = new DBParameterCollection();
                paramcollection.Add(new DBParameter("PersonalHygieneCheckListId", receive.PersonalHygieneCheckListId));
                paramcollection.Add(new DBParameter("PersonalHygieneCheckListDate", receive.PersonalHygieneCheckListDate));
                paramcollection.Add(new DBParameter("EmployeeId", receive.EmployeeId));
                paramcollection.Add(new DBParameter("DesignationId", receive.DesignationId));
                paramcollection.Add(new DBParameter("UniformCleaning", receive.UniformCleaning));
                paramcollection.Add(new DBParameter("Nail", receive.Nail));
                paramcollection.Add(new DBParameter("Cap", receive.Cap));
                paramcollection.Add(new DBParameter("ApronLab", receive.ApronLab));
                paramcollection.Add(new DBParameter("BeardCrimp", receive.BeardCrimp));
                paramcollection.Add(new DBParameter("HandGloves", receive.HandGloves));
                paramcollection.Add(new DBParameter("Mask", receive.Mask));
                paramcollection.Add(new DBParameter("@flag", receive.flag));
                result = _DBHelper.ExecuteNonQuery("sp_Prod_PersonalHygieneCheckListDetails", paramcollection, CommandType.StoredProcedure);
            }
            catch (Exception EX)
            {
                string MSG = EX.ToString();
            }
            return(result);
        }
Esempio n. 2
0
        public int personalhygienedata(MPersonalHygieneCheckList receive)
        {
            daphl = new DAPersonalHygieneCheckList();
            int Result = 0;

            try
            {
                Result = daphl.personalhygienedata(receive);
            }
            catch (Exception)
            {
                throw;
            }
            return(Result);
        }
Esempio n. 3
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            mphcl = new MPersonalHygieneCheckList();
            bphcl = new BPersonalHygieneCheckList();
            int Result = 0;

            mphcl.PersonalHygieneCheckListId   = 0;
            mphcl.PersonalHygieneCheckListDate = Convert.ToDateTime(txtDate.Text.ToString());
            mphcl.EmployeeId    = Convert.ToInt32(dpEmployee.SelectedItem.Value);
            mphcl.DesignationId = Convert.ToInt32(dpDesignation.SelectedItem.Value);
            if (chkUniform.Checked)
            {
                mphcl.UniformCleaning = true;
            }
            else
            {
                mphcl.UniformCleaning = false;
            }

            if (chkBeardCrimp.Checked)
            {
                mphcl.BeardCrimp = true;
            }
            else
            {
                mphcl.BeardCrimp = false;
            }

            if (chkNail.Checked)
            {
                mphcl.Nail = true;
            }
            else
            {
                mphcl.Nail = false;
            }

            if (chkCap.Checked)
            {
                mphcl.Cap = true;
            }
            else
            {
                mphcl.Cap = false;
            }

            if (chkApronLab.Checked)
            {
                mphcl.ApronLab = true;
            }
            else
            {
                mphcl.ApronLab = false;
            }

            if (chkHandGloves.Checked)
            {
                mphcl.HandGloves = true;
            }
            else
            {
                mphcl.HandGloves = false;
            }

            if (chkMask.Checked)
            {
                mphcl.Mask = true;
            }
            else
            {
                mphcl.Mask = false;
            }

            mphcl.flag = "insert";
            Result     = bphcl.personalhygienedata(mphcl);
            if (Result > 0)
            {
                divDanger.Visible  = false;
                divwarning.Visible = false;

                divSusccess.Visible = true;
                lblSuccess.Text     = "Personal Hygiene CheckList Data Added  Successfully";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "sel3", "$('#bx2').removeClass('collapsed-box');", true);
                pnlError.Update();
            }
            else
            {
                divDanger.Visible   = false;
                divwarning.Visible  = true;
                divSusccess.Visible = false;
                lblSuccess.Text     = "Something went wrong plz contact site admin";
                pnlError.Update();
            }
        }
Esempio n. 4
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            mphcl = new MPersonalHygieneCheckList();
            bphcl = new BPersonalHygieneCheckList();
            int Result = 0;

            mphcl.PersonalHygieneCheckListId   = string.IsNullOrEmpty(hId.Value)?0:Convert.ToInt32(hId.Value);
            mphcl.PersonalHygieneCheckListDate = Convert.ToDateTime(txtDate.Text.ToString());
            mphcl.EmployeeId    = Convert.ToInt32(dpEmployee.SelectedItem.Value);
            mphcl.DesignationId = Convert.ToInt32(dpDesignation.SelectedItem.Value);
            if (chkUniform.Checked)
            {
                mphcl.UniformCleaning = true;
            }
            else
            {
                mphcl.UniformCleaning = false;
            }

            if (chkBeardCrimp.Checked)
            {
                mphcl.BeardCrimp = true;
            }
            else
            {
                mphcl.BeardCrimp = false;
            }

            if (chkNail.Checked)
            {
                mphcl.Nail = true;
            }
            else
            {
                mphcl.Nail = false;
            }

            if (chkCap.Checked)
            {
                mphcl.Cap = true;
            }
            else
            {
                mphcl.Cap = false;
            }

            if (chkApronLab.Checked)
            {
                mphcl.ApronLab = true;
            }
            else
            {
                mphcl.ApronLab = false;
            }

            if (chkHandGloves.Checked)
            {
                mphcl.HandGloves = true;
            }
            else
            {
                mphcl.HandGloves = false;
            }

            if (chkMask.Checked)
            {
                mphcl.Mask = true;
            }
            else
            {
                mphcl.Mask = false;
            }

            mphcl.flag = "Update";
            Result     = bphcl.personalhygienedata(mphcl);
            if (Result > 0)
            {
                divDanger.Visible  = false;
                divwarning.Visible = false;

                divSusccess.Visible = true;
                lblSuccess.Text     = "Personal Hygiene CheckList Data Updated  Successfully";
                pnlError.Update();
            }
            else
            {
                divDanger.Visible   = false;
                divwarning.Visible  = true;
                divSusccess.Visible = false;
                lblSuccess.Text     = "Something went wrong plz contact site admin";
                pnlError.Update();
            }
        }