Exemple #1
0
        public int khoadata(MKhoaPlantLogQC receive)
        {
            int result = 0;

            try
            {
                DBParameterCollection paramcollection = new DBParameterCollection();
                paramcollection.Add(new DBParameter("@RMRId", receive.RMRId));
                paramcollection.Add(new DBParameter("@KhoaPlantLogQCId", receive.KhoaPlantLogQCId));
                paramcollection.Add(new DBParameter("@KhoaPlantLogQCDate", receive.KhoaPlantLogQCDate));
                paramcollection.Add(new DBParameter("@KhoaPlantLogQCShiftId", receive.KhoaPlantLogQCShiftId));
                paramcollection.Add(new DBParameter("@TypeOfMilk", receive.TypeOfMilk));
                paramcollection.Add(new DBParameter("@SNF", receive.SNF));
                paramcollection.Add(new DBParameter("@Acidity", receive.Acidity));
                paramcollection.Add(new DBParameter("@SugarAddedQuantity", receive.SugarAddedQuantity));
                paramcollection.Add(new DBParameter("@FinalProductQuantity", receive.FinalProductQuantity));
                paramcollection.Add(new DBParameter("@BoilingTemperature", receive.BoilingTemperature));
                paramcollection.Add(new DBParameter("@StartingTime", receive.StartingTime));
                paramcollection.Add(new DBParameter("@EndTime", receive.EndTime));
                paramcollection.Add(new DBParameter("@CleanedBy", receive.CleanedBy));
                paramcollection.Add(new DBParameter("@ChemicalUsed", receive.ChemicalUsed));
                paramcollection.Add(new DBParameter("@Remarks", receive.Remarks));
                paramcollection.Add(new DBParameter("@PreparedBy", receive.PreparedBy));
                paramcollection.Add(new DBParameter("@CheckedBy", receive.CheckedBy));
                paramcollection.Add(new DBParameter("@ApprovedBy", receive.ApprovedBy));
                paramcollection.Add(new DBParameter("@flag", receive.flag));
                result = _DBHelper.ExecuteNonQuery("sp_Prod_KhoaPlantLogQCDetails", paramcollection, CommandType.StoredProcedure);
            }
            catch (Exception EX)
            {
                String MSG = EX.ToString();
            }
            return(result);
        }
Exemple #2
0
        public int khoadata(MKhoaPlantLogQC receive)
        {
            dakplqc = new DAKhoaPlantLogQC();
            int Result = 0;

            try
            {
                Result = dakplqc.khoadata(receive);
            }
            catch (Exception)
            {
                throw;
            }
            return(Result);
        }
Exemple #3
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            mkplqc = new MKhoaPlantLogQC();
            bkplqc = new BKhoaPlantLogQC();
            int Result = 0;

            mkplqc.KhoaPlantLogQCId      = 0;
            mkplqc.RMRId                 = string.IsNullOrEmpty(hId.Value) ? 0 : Convert.ToInt32(hId.Value);
            mkplqc.KhoaPlantLogQCDate    = Convert.ToDateTime(txtDate.Text.ToString());
            mkplqc.KhoaPlantLogQCShiftId = Convert.ToInt32(dpShiftDetails.SelectedItem.Value);
            mkplqc.TypeOfMilk            = string.IsNullOrEmpty(txtTypeOfMilk.Text) ? string.Empty : txtTypeOfMilk.Text;
            mkplqc.SNF                  = string.IsNullOrEmpty(txtSNF.Text) ? 0 : Convert.ToDouble(txtSNF.Text);
            mkplqc.Acidity              = string.IsNullOrEmpty(txtAcidity.Text) ? 0 : Convert.ToDouble(txtAcidity.Text);
            mkplqc.SugarAddedQuantity   = string.IsNullOrEmpty(txtSugarAddedQuantity.Text) ? 0 : Convert.ToDouble(txtSugarAddedQuantity.Text);
            mkplqc.FinalProductQuantity = string.IsNullOrEmpty(txtFinalProductQuantity.Text) ? 0 : Convert.ToDouble(txtFinalProductQuantity.Text);
            mkplqc.BoilingTemperature   = string.IsNullOrEmpty(txtBoilingTemperature.Text) ? 0 : Convert.ToDouble(txtBoilingTemperature.Text);
            mkplqc.StartingTime         = string.IsNullOrEmpty(txtStartingTime.Text) ? string.Empty : txtStartingTime.Text;
            mkplqc.EndTime              = string.IsNullOrEmpty(txtEndTime.Text) ? string.Empty : txtEndTime.Text;
            mkplqc.CleanedBy            = string.IsNullOrEmpty(txtCleanedBy.Text) ? string.Empty : txtCleanedBy.Text;
            mkplqc.ChemicalUsed         = string.IsNullOrEmpty(txtChemicalUsed.Text) ? string.Empty : txtChemicalUsed.Text;
            mkplqc.Remarks              = string.IsNullOrEmpty(txtRemarks.Text) ? string.Empty : txtRemarks.Text;
            mkplqc.PreparedBy           = string.IsNullOrEmpty(txtPreparedBy.Text) ? string.Empty : txtPreparedBy.Text;
            mkplqc.CheckedBy            = string.IsNullOrEmpty(txtCheckedBy.Text) ? string.Empty : txtCheckedBy.Text;
            mkplqc.ApprovedBy           = string.IsNullOrEmpty(txtApprovedBy.Text) ? string.Empty : txtApprovedBy.Text;
            mkplqc.flag                 = "Insert";
            Result = bkplqc.khoadata(mkplqc);
            if (Result > 0)
            {
                divDanger.Visible  = false;
                divwarning.Visible = false;

                divSusccess.Visible = true;
                lblSuccess.Text     = "Khoa Plant Log QC Data Added  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();
            }

            //return Result;
        }