public int microbiologicaldata(MMicrobiologicalCultureStockRegisterQC receive)
        {
            int result = 0;

            try
            {
                DBParameterCollection paramcollection = new DBParameterCollection();
                paramcollection.Add(new DBParameter("@MicrobiologicalCultureStockRegisterQCId", receive.MicrobiologicalCultureStockRegisterQCId));
                paramcollection.Add(new DBParameter("@MicrobiologicalStockDate", receive.MicrobiologicalStockDate));
                paramcollection.Add(new DBParameter("@ReceivedDate", receive.ReceivedDate));
                paramcollection.Add(new DBParameter("@PackingDate", receive.PackingDate));
                paramcollection.Add(new DBParameter("@OpeningStock", receive.OpeningStock));
                paramcollection.Add(new DBParameter("@Receipt", receive.Receipt));
                paramcollection.Add(new DBParameter("@Issue", receive.Issue));
                paramcollection.Add(new DBParameter("@Damage", receive.Damage));
                paramcollection.Add(new DBParameter("@Returned", receive.Returned));
                paramcollection.Add(new DBParameter("@ClosingStock", receive.ClosingStock));
                paramcollection.Add(new DBParameter("@CultureUsed", receive.CultureUsed));
                paramcollection.Add(new DBParameter("@VerifiedBy", receive.VerifiedBy));
                paramcollection.Add(new DBParameter("@flag", receive.flag));
                result = _DBHelper.ExecuteNonQuery("sp_Prod_MicrobiologicalCultureStockRegisterQCDetails", paramcollection, CommandType.StoredProcedure);
            }
            catch (Exception EX)
            {
                string MSG = EX.ToString();
            }
            return(result);
        }
        public int microbiologicaldata(MMicrobiologicalCultureStockRegisterQC receive)
        {
            dambcsrqc = new DAMicrobiologicalCultureStockRegisterQC();
            int Result = 0;

            try
            {
                Result = dambcsrqc.microbiologicaldata(receive);
            }
            catch (Exception)
            {
                throw;
            }
            return(Result);
        }
Ejemplo n.º 3
0
        protected void btnUpdate_Click1(object sender, EventArgs e)
        {
            mmbcsrqc = new MMicrobiologicalCultureStockRegisterQC();
            bmbcsrqc = new BMicrobiologicalCultureStockRegisterQC();
            int Result = 0;

            mmbcsrqc.MicrobiologicalCultureStockRegisterQCId = Convert.ToInt32(hId.Value);
            mmbcsrqc.MicrobiologicalStockDate = Convert.ToDateTime(txtStockDate.Text.ToString());
            mmbcsrqc.ReceivedDate             = Convert.ToDateTime(txtReceivedDate.Text.ToString());
            mmbcsrqc.PackingDate  = Convert.ToDateTime(txtPackingDate.Text.ToString());
            mmbcsrqc.OpeningStock = string.IsNullOrEmpty(txtOpeningStock.Text) ? 0 : Convert.ToDouble(txtOpeningStock.Text);
            mmbcsrqc.Receipt      = string.IsNullOrEmpty(txtReceipt.Text) ? string.Empty : txtReceipt.Text;
            mmbcsrqc.Issue        = string.IsNullOrEmpty(txtIssue.Text) ? string.Empty : txtIssue.Text;
            mmbcsrqc.Damage       = string.IsNullOrEmpty(txtDamage.Text) ? string.Empty : txtDamage.Text;
            mmbcsrqc.Returned     = string.IsNullOrEmpty(txtReturned.Text) ? string.Empty : txtReturned.Text;
            mmbcsrqc.ClosingStock = string.IsNullOrEmpty(txtClosingStock.Text) ? 0 : Convert.ToDouble(txtClosingStock.Text);
            mmbcsrqc.CultureUsed  = string.IsNullOrEmpty(txtCultureUsed.Text) ? string.Empty : txtCultureUsed.Text;
            mmbcsrqc.VerifiedBy   = string.IsNullOrEmpty(txtVerifiedBy.Text) ? string.Empty : txtVerifiedBy.Text;
            mmbcsrqc.flag         = "Update";
            Result = bmbcsrqc.microbiologicaldata(mmbcsrqc);
            if (Result > 0)
            {
                divDanger.Visible  = false;
                divwarning.Visible = false;

                divSusccess.Visible = true;
                lblSuccess.Text     = "Micro biological Culture Stock Register QC Data Updated  Successfully";
                pnlError.Update();
                // GetPastDetails();
            }
            else
            {
                divDanger.Visible   = false;
                divwarning.Visible  = true;
                divSusccess.Visible = false;
                lblSuccess.Text     = "Something went wrong plz contact site admin";
                pnlError.Update();
            }
        }
Ejemplo n.º 4
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            mmbcsrqc = new MMicrobiologicalCultureStockRegisterQC();
            bmbcsrqc = new BMicrobiologicalCultureStockRegisterQC();
            int Result = 0;

            mmbcsrqc.MicrobiologicalCultureStockRegisterQCId = 0;
            mmbcsrqc.MicrobiologicalStockDate = Convert.ToDateTime(txtStockDate.Text.ToString());
            mmbcsrqc.ReceivedDate             = Convert.ToDateTime(txtReceivedDate.Text.ToString());
            mmbcsrqc.PackingDate  = Convert.ToDateTime(txtPackingDate.Text.ToString());
            mmbcsrqc.OpeningStock = string.IsNullOrEmpty(txtOpeningStock.Text) ? 0 : Convert.ToDouble(txtOpeningStock.Text);
            mmbcsrqc.Receipt      = string.IsNullOrEmpty(txtReceipt.Text) ? string.Empty :txtReceipt.Text;
            mmbcsrqc.Issue        = string.IsNullOrEmpty(txtIssue.Text)?string.Empty:txtIssue.Text;
            mmbcsrqc.Damage       = string.IsNullOrEmpty(txtDamage.Text) ? string.Empty:txtDamage.Text;
            mmbcsrqc.Returned     = string.IsNullOrEmpty(txtReturned.Text) ? string.Empty:txtReturned.Text;
            mmbcsrqc.ClosingStock = string.IsNullOrEmpty(txtClosingStock.Text) ? 0 : Convert.ToDouble(txtClosingStock.Text);
            mmbcsrqc.CultureUsed  = string.IsNullOrEmpty(txtCultureUsed.Text) ? string.Empty:txtCultureUsed.Text;
            mmbcsrqc.VerifiedBy   = string.IsNullOrEmpty(txtVerifiedBy.Text) ? string.Empty : txtVerifiedBy.Text;
            mmbcsrqc.flag         = "Insert";
            Result = bmbcsrqc.microbiologicaldata(mmbcsrqc);
            if (Result > 0)
            {
                divDanger.Visible  = false;
                divwarning.Visible = false;

                divSusccess.Visible = true;
                lblSuccess.Text     = "Micro biological Culture Stock Register QC Data Added  Successfully";
                pnlError.Update();
                ScriptManager.RegisterStartupScript(this, this.GetType(), "sel3", "$('#bx1').removeClass('collapsed-box');", true);
            }
            else
            {
                divDanger.Visible   = false;
                divwarning.Visible  = true;
                divSusccess.Visible = false;
                lblSuccess.Text     = "Something went wrong plz contact site admin";
                pnlError.Update();
            }
        }