Exemple #1
0
        protected void btnUpdateCurdProcessdetail_Click(object sender, EventArgs e)
        {
            MCdata = new MCurdProcessing();
            BCdata = new BCurdProcessing();
            int Result = 0;

            MCdata.CurdId                 = 0;
            MCdata.RMRId                  = string.IsNullOrEmpty(hId.Value) ? 0 : Convert.ToInt32(hId.Value);
            MCdata.CurdProcessDate        = Convert.ToDateTime(txtDate.Text).ToString("dd-MM-yyyy");
            MCdata.CurdProcessShiftId     = Convert.ToInt32(dpCurdProcessShiftId.SelectedItem.Value);
            MCdata.HeatingTemp            = string.IsNullOrEmpty(txtHeatingTemperature.Text) ? 0 : Convert.ToDouble(txtHeatingTemperature.Text);
            MCdata.HoldingTime            = string.IsNullOrEmpty(txtHoldingTime.Text) ? string.Empty : txtHoldingTime.Text;
            MCdata.InoculationMilkTemp    = string.IsNullOrEmpty(txtInoculation.Text) ? 0 : Convert.ToDouble(txtInoculation.Text);
            MCdata.CultureAdd             = string.IsNullOrEmpty(txtCultureName.Text) ? string.Empty : txtCultureName.Text;
            MCdata.CultureLotNo           = string.IsNullOrEmpty(txtCulturelotNo.Text) ? string.Empty : txtCulturelotNo.Text;
            MCdata.CultureExpDate         = Convert.ToDateTime(txtcultureExpDate.Text).ToString("dd-MM-yyyy");
            MCdata.IncubationStartTime    = string.IsNullOrEmpty(txtIncubationStartTime.Text) ? string.Empty : txtIncubationStartTime.Text;
            MCdata.IncubationEndTime      = string.IsNullOrEmpty(txtIncubationStartTime.Text) ? string.Empty : txtIncubationStartTime.Text;
            MCdata.MilkQtyforCanCurd      = string.IsNullOrEmpty(txtQtyMilkforCanCurd.Text) ? 0 : Convert.ToDouble(txtQtyMilkforCanCurd.Text);
            MCdata.MilkQtyforCupPouchCurd = string.IsNullOrEmpty(txtQtyMilkforCupPouchCurd.Text) ? 0 : Convert.ToDouble(txtQtyMilkforCupPouchCurd.Text);
            MCdata.PackingStartTime       = string.IsNullOrEmpty(txtPackingStartTime.Text) ? string.Empty : txtPackingStartTime.Text;
            MCdata.PackingEndTime         = string.IsNullOrEmpty(txtPackingEndTime.Text) ? string.Empty : txtPackingEndTime.Text;
            MCdata.BatchCode              = string.IsNullOrEmpty(txtBatchcode.Text) ? string.Empty : txtBatchcode.Text;
            MCdata.ColdRoomTemp           = string.IsNullOrEmpty(txtColdRoomTemp.Text) ? 0 : Convert.ToDouble(txtColdRoomTemp.Text);
            MCdata.ProcessedBy            = string.IsNullOrEmpty(txtProcessedby.Text) ? string.Empty : txtProcessedby.Text;
            MCdata.LabTechnician          = string.IsNullOrEmpty(txtLabTechnician.Text) ? string.Empty : txtLabTechnician.Text;
            MCdata.VerifiedBy             = string.IsNullOrEmpty(txtVerifiedBy.Text) ? string.Empty : txtVerifiedBy.Text;
            MCdata.ApprovedBy             = string.IsNullOrEmpty(txtApprovedBy.Text) ? string.Empty : txtApprovedBy.Text;
            MCdata.CurdProcessingStatusId = Convert.ToInt32(dpCurdProcessingStatusId.SelectedItem.Value);
            MCdata.flag = "Update";
            Result      = BCdata.CurdProcessData(MCdata);
            if (Result > 0)
            {
                divDanger.Visible   = false;
                divwarning.Visible  = false;
                divSusccess.Visible = true;

                ScriptManager.RegisterStartupScript(this, this.GetType(), "sel3", "$('#bx1').addClass('collapsed-box');", true);

                //string dates = string.IsNullOrEmpty(txtSearchDate.Text) ? string.Empty : Convert.ToDateTime(txtSearchDate.Text).ToString("dd-MM-yyyy");
                //GetCurdProcessDetails(dates);
                RMRecieve R = new RMRecieve();
                R.RMRDate = Convert.ToDateTime(txtSearchDate.Text);
                GetCurdProcessDetails(R);
                uprouteList.Update();
                lblSuccess.Text = "Curd Processing 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();
            }
        }
Exemple #2
0
        public int CurdProcessData(MCurdProcessing receive)
        {
            dacurdprocess = new DACurdProcessing();
            int Result = 0;

            try
            {
                Result = dacurdprocess.CurdProcessData(receive);
            }
            catch (Exception)
            {
                throw;
            }
            return(Result);
        }
Exemple #3
0
        public int CurdProcessData(MCurdProcessing recieve)
        {
            int result = 0;

            try
            {
                DBParameterCollection paramCollection = new DBParameterCollection();
                paramCollection.Add(new DBParameter("@RMRId", recieve.RMRId));
                paramCollection.Add(new DBParameter("@CurdProcessDate", recieve.CurdProcessDate));
                paramCollection.Add(new DBParameter("@CurdProcessShiftId", recieve.CurdProcessShiftId));
                paramCollection.Add(new DBParameter("@HeatTemp", recieve.HeatingTemp));
                paramCollection.Add(new DBParameter("@HoldTime", recieve.HoldingTime));
                paramCollection.Add(new DBParameter("@Inoculation", recieve.InoculationMilkTemp));
                paramCollection.Add(new DBParameter("@CultureAdd", recieve.CultureAdd));
                paramCollection.Add(new DBParameter("@CultureLotNo", recieve.CultureLotNo));
                paramCollection.Add(new DBParameter("@CultureExpDate", recieve.CultureExpDate));
                paramCollection.Add(new DBParameter("@IncubationStart", recieve.IncubationStartTime));
                paramCollection.Add(new DBParameter("@IncubationEnd", recieve.IncubationEndTime));
                paramCollection.Add(new DBParameter("@CanCurd", recieve.MilkQtyforCanCurd));
                paramCollection.Add(new DBParameter("@CupPauchCurd", recieve.MilkQtyforCupPouchCurd));
                paramCollection.Add(new DBParameter("@PackingStartTime", recieve.PackingStartTime));
                paramCollection.Add(new DBParameter("@PackingEndTime", recieve.PackingEndTime));
                paramCollection.Add(new DBParameter("@BatchCode", recieve.BatchCode));
                paramCollection.Add(new DBParameter("@ColdRoomTemp", recieve.ColdRoomTemp));
                paramCollection.Add(new DBParameter("@ProcessBy", recieve.ProcessedBy));
                paramCollection.Add(new DBParameter("@LabTech", recieve.LabTechnician));
                paramCollection.Add(new DBParameter("@VerifiedBy", recieve.VerifiedBy));
                paramCollection.Add(new DBParameter("@ApprovedBy", recieve.ApprovedBy));
                paramCollection.Add(new DBParameter("@CurdProcessingStatusId", recieve.CurdProcessingStatusId));
                paramCollection.Add(new DBParameter("@flag", recieve.flag));
                result = _DBHelper.ExecuteNonQuery("sp_Prod_CurdProcessing", paramCollection, CommandType.StoredProcedure);
            }
            catch (Exception EX)
            {
                string MSG = EX.ToString();
            }
            return(result);
        }