Beispiel #1
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            mgpr = new MGheeProductionRegister();
            bgpr = new BGheeProductionRegister();
            int Result = 0;

            mgpr.GheeProductionRegisterId = 0;
            mgpr.RMRId = string.IsNullOrEmpty(hId.Value) ? 0 : Convert.ToInt32(hId.Value);
            mgpr.GheeProductionRegisterDate    = Convert.ToDateTime(txtDate.Text.ToString());
            mgpr.GheeProductionRegisterShiftId = Convert.ToInt32(dpShiftDetails.SelectedItem.Value);
            mgpr.CreamQualityPhysical          = string.IsNullOrEmpty(txtCreamQualityPhysical.Text) ? string.Empty : txtCreamQualityPhysical.Text;
            mgpr.CreamQualityOthers            = string.IsNullOrEmpty(txtCreamQualityOthers.Text) ? string.Empty : txtCreamQualityOthers.Text;
            mgpr.CreamQualityCheckedBy         = string.IsNullOrEmpty(txtCreamQualityCheckedBy.Text) ? string.Empty : txtCreamQualityCheckedBy.Text;;
            mgpr.CreamApprovedBy     = string.IsNullOrEmpty(txtCreamApprovedBy.Text) ? string.Empty : txtCreamApprovedBy.Text;
            mgpr.HeatingTemperature  = string.IsNullOrEmpty(txtHeatingTemp.Text) ? 0 : Convert.ToDouble(txtHeatingTemp.Text);
            mgpr.BoilingStartingTime = string.IsNullOrEmpty(txtBoilingStartingTime.Text) ? string.Empty : txtBoilingStartingTime.Text;
            mgpr.BoilingEndTime      = string.IsNullOrEmpty(txtBoilingEndTime.Text) ? string.Empty : txtBoilingEndTime.Text;
            mgpr.SettingStartTime    = string.IsNullOrEmpty(txtSettingStartTime.Text) ? string.Empty : txtSettingStartTime.Text;
            mgpr.SettingEndTime      = string.IsNullOrEmpty(txtSetEndTime.Text) ? string.Empty : txtSetEndTime.Text;
            mgpr.ResidueQuantity     = string.IsNullOrEmpty(txtResidueQuantity.Text) ? 0 : Convert.ToDouble(txtResidueQuantity.Text);
            mgpr.VesselsCleaning     = string.IsNullOrEmpty(txtVesselsCleaning.Text) ? string.Empty : txtVesselsCleaning.Text;
            mgpr.InoculationcultureQualityandAcidityFlavour     = string.IsNullOrEmpty(txtInoculationFlavour.Text) ? string.Empty : txtInoculationFlavour.Text;
            mgpr.InoculationcultureQualityandAciditySetting     = string.IsNullOrEmpty(txtInoculationSetting.Text) ? string.Empty : txtInoculationSetting.Text;
            mgpr.InoculationcultureQualityandAcidityTemperature = string.IsNullOrEmpty(txtInoculationTemperature.Text) ? 0 : Convert.ToDouble(txtInoculationTemperature.Text);
            mgpr.QualityBeforePackingAppearing = string.IsNullOrEmpty(txtQualityBeforePackingAppearing.Text) ? string.Empty : txtQualityBeforePackingAppearing.Text;
            mgpr.QualityBeforePackingFlavour   = string.IsNullOrEmpty(txtQualityBeforePackingFlavour.Text) ? string.Empty : txtQualityBeforePackingFlavour.Text;
            mgpr.FinalProductionQuantity       = string.IsNullOrEmpty(txtFinalProductionQuantity.Text) ? 0 : Convert.ToDouble(txtFinalProductionQuantity.Text);
            mgpr.InspectedBy = string.IsNullOrEmpty(txtInspectedBy.Text) ? string.Empty : txtInspectedBy.Text;
            mgpr.VerifiedBy  = string.IsNullOrEmpty(txtVerifiedBy.Text) ? string.Empty : txtVerifiedBy.Text;
            mgpr.ApprovedBy  = string.IsNullOrEmpty(txtApprovedBy.Text) ? string.Empty : txtApprovedBy.Text;
            mgpr.flag        = "Update";
            Result           = bgpr.gheedata(mgpr);
            if (Result > 0)
            {
                divDanger.Visible  = false;
                divwarning.Visible = false;

                divSusccess.Visible = true;
                lblSuccess.Text     = "Ghee Production Register 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();
            }
        }
        public int gheedata(MGheeProductionRegister receive)
        {
            dagpr = new DAGheeProductionRegister();
            int Result = 0;

            try
            {
                Result = dagpr.gheedata(receive);
            }
            catch (Exception)
            {
                throw;
            }
            return(Result);
        }
        public int gheedata(MGheeProductionRegister receive)
        {
            int result = 0;

            try
            {
                DBParameterCollection paramcollection = new DBParameterCollection();
                paramcollection.Add(new DBParameter("@RMRId", receive.RMRId));
                paramcollection.Add(new DBParameter("@GheeProductionRegisterId", receive.GheeProductionRegisterId));
                paramcollection.Add(new DBParameter("@GheeProductionRegisterDate", receive.GheeProductionRegisterDate));
                paramcollection.Add(new DBParameter("@GheeProductionRegisterShiftId", receive.GheeProductionRegisterShiftId));
                paramcollection.Add(new DBParameter("@CreamQualityPhysical", receive.CreamQualityPhysical));
                paramcollection.Add(new DBParameter("@CreamQualityOthers", receive.CreamQualityOthers));
                paramcollection.Add(new DBParameter("@CreamQualityCheckedBy", receive.CreamQualityCheckedBy));
                paramcollection.Add(new DBParameter("@CreamApprovedBy", receive.CreamApprovedBy));
                paramcollection.Add(new DBParameter("@HeatingTemperature", receive.HeatingTemperature));
                paramcollection.Add(new DBParameter("@BoilingStartingTime", receive.BoilingStartingTime));
                paramcollection.Add(new DBParameter("@BoilingEndTime", receive.BoilingEndTime));
                paramcollection.Add(new DBParameter("@SettingStartTime", receive.SettingStartTime));
                paramcollection.Add(new DBParameter("@SettingEndTime", receive.SettingEndTime));
                paramcollection.Add(new DBParameter("@ResidueQuantity", receive.ResidueQuantity));
                paramcollection.Add(new DBParameter("@VesselsCleaning", receive.VesselsCleaning));
                paramcollection.Add(new DBParameter("@InoculationcultureQualityandAcidityFlavour", receive.InoculationcultureQualityandAcidityFlavour));
                paramcollection.Add(new DBParameter("@InoculationcultureQualityandAciditySetting", receive.InoculationcultureQualityandAciditySetting));
                paramcollection.Add(new DBParameter("@InoculationcultureQualityandAcidityTemperature", receive.InoculationcultureQualityandAcidityTemperature));
                paramcollection.Add(new DBParameter("@QualityBeforePackingAppearing", receive.QualityBeforePackingAppearing));
                paramcollection.Add(new DBParameter("@QualityBeforePackingFlavour", receive.QualityBeforePackingFlavour));
                paramcollection.Add(new DBParameter("@FinalProductionQuantity", receive.FinalProductionQuantity));
                paramcollection.Add(new DBParameter("@InspectedBy", receive.InspectedBy));
                paramcollection.Add(new DBParameter("@VerifiedBy", receive.VerifiedBy));
                paramcollection.Add(new DBParameter("@ApprovedBy", receive.ApprovedBy));
                paramcollection.Add(new DBParameter("@flag", receive.flag));
                result = _DBHelper.ExecuteNonQuery("sp_Prod_GheeProductionRegisterDetails", paramcollection, CommandType.StoredProcedure);
            }
            catch (Exception EX)
            {
                string MSG = EX.ToString();
            }
            return(result);
        }