public int personalhygieneqcdata(MPersonalHygieneCheckListQC receive)
        {
            int result = 0;

            try
            {
                DBParameterCollection paramcollection = new DBParameterCollection();
                paramcollection.Add(new DBParameter("PersonalHygieneCheckListQCId", receive.PersonalHygieneCheckListQCId));
                paramcollection.Add(new DBParameter("PersonalHygieneCheckListQCDate", receive.PersonalHygieneCheckListQCDate));
                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_PersonalHygieneCheckListQCDetails", paramcollection, CommandType.StoredProcedure);
            }
            catch (Exception EX)
            {
                string MSG = EX.ToString();
            }
            return(result);
        }
Exemplo n.º 2
0
        public int personalhygieneqcdata(MPersonalHygieneCheckListQC receive)
        {
            daphcqc = new DAPersonalHygieneCheckListQC();
            int Result = 0;

            try
            {
                Result = daphcqc.personalhygieneqcdata(receive);
            }

            catch (Exception)
            {
                throw;
            }
            return(Result);
        }
        protected void btnAdd_Click1(object sender, EventArgs e)
        {
            mphcqc = new MPersonalHygieneCheckListQC();
            bphcqc = new BPersonalHygieneCheckListQC();
            int Result = 0;

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

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

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

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

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

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

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

            mphcqc.flag = "Insert";
            Result      = bphcqc.personalhygieneqcdata(mphcqc);
            if (Result > 0)
            {
                divDanger.Visible  = false;
                divwarning.Visible = false;

                divSusccess.Visible = true;
                lblSuccess.Text     = "Personal Hygiene CheckListQC 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();
            }
        }
        protected void btnUpdate_Click1(object sender, EventArgs e)
        {
            mphcqc = new MPersonalHygieneCheckListQC();
            bphcqc = new BPersonalHygieneCheckListQC();
            int Result = 0;

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

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

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

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

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

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

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

            mphcqc.flag = "Update";
            Result      = bphcqc.personalhygieneqcdata(mphcqc);
            if (Result > 0)
            {
                divDanger.Visible  = false;
                divwarning.Visible = false;

                divSusccess.Visible = true;
                lblSuccess.Text     = "Personal Hygiene CheckListQC 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();
            }
        }