public int buttermilkdata(MButterMilkPreparation receive)
        {
            int result = 0;

            try
            {
                DBParameterCollection paramcollection = new DBParameterCollection();
                paramcollection.Add(new DBParameter("@RMRId", receive.RMRId));
                paramcollection.Add(new DBParameter("@ButterMilkPreparationId", receive.ButterMilkPreparationId));
                paramcollection.Add(new DBParameter("@ButterMilkPreparationDate", receive.ButterMilkPreparationDate));
                paramcollection.Add(new DBParameter("@ButterMilkPreparationShiftId", receive.ButterMilkPreparationShiftId));
                paramcollection.Add(new DBParameter("@CurdQuantity", receive.CurdQuantity));
                paramcollection.Add(new DBParameter("@GingerQuantity", receive.GingerQuantity));
                paramcollection.Add(new DBParameter("@ChillyQuantity", receive.ChillyQuantity));
                paramcollection.Add(new DBParameter("@Salt", receive.Salt));
                paramcollection.Add(new DBParameter("@CurryLeaves", receive.CurryLeaves));
                paramcollection.Add(new DBParameter("@CorianderLeaves", receive.CorianderLeaves));
                paramcollection.Add(new DBParameter("@Lemon", receive.Lemon));
                paramcollection.Add(new DBParameter("@TotalPouchProduction", receive.TotalPouchProduction));
                paramcollection.Add(new DBParameter("@Damage", receive.Damage));
                paramcollection.Add(new DBParameter("@MixedAndTastedBy", receive.MixedAndTastedBy));
                paramcollection.Add(new DBParameter("@TastedAndMonitoredBy", receive.TastedAndMonitoredBy));
                paramcollection.Add(new DBParameter("@flag", receive.flag));
                result = _DBHelper.ExecuteNonQuery("sp_prod_ButterMilkPreparationDetails", paramcollection, CommandType.StoredProcedure);
            }
            catch (Exception EX)
            {
                String MSG = EX.ToString();
            }
            return(result);
        }
Example #2
0
        public int buttermilkdata(MButterMilkPreparation receive)
        {
            dabmp = new DAButterMilkPreparation();
            int Result = 0;

            try
            {
                Result = dabmp.buttermilkdata(receive);
            }
            catch (Exception)
            {
                throw;
            }
            return(Result);
        }
Example #3
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            {
                mbmp = new MButterMilkPreparation();
                bbmp = new BButterMilkPreparation();
                int Result = 0;
                mbmp.ButterMilkPreparationId = 0;
                mbmp.RMRId = string.IsNullOrEmpty(hId.Value) ? 0 : Convert.ToInt32(hId.Value);
                mbmp.ButterMilkPreparationDate    = Convert.ToDateTime(txtDate.Text.ToString());
                mbmp.ButterMilkPreparationShiftId = Convert.ToInt32(dpShiftDetails.SelectedItem.Value);
                mbmp.CurdQuantity         = string.IsNullOrEmpty(txtCurdQuantity.Text) ? 0 : Convert.ToDouble(txtCurdQuantity.Text);
                mbmp.GingerQuantity       = string.IsNullOrEmpty(txtGingerQuantity.Text) ? 0 : Convert.ToDouble(txtGingerQuantity.Text);
                mbmp.ChillyQuantity       = string.IsNullOrEmpty(txtChillyQuantity.Text) ? 0 : Convert.ToDouble(txtChillyQuantity.Text);
                mbmp.Salt                 = string.IsNullOrEmpty(txtSalt.Text) ? 0 : Convert.ToDouble(txtSalt.Text);
                mbmp.CurryLeaves          = string.IsNullOrEmpty(txtCurryLeaves.Text) ? 0 : Convert.ToDouble(txtCurryLeaves.Text);
                mbmp.CorianderLeaves      = string.IsNullOrEmpty(txtCorianderLeaves.Text) ? 0 : Convert.ToDouble(txtCorianderLeaves.Text);
                mbmp.Lemon                = string.IsNullOrEmpty(txtLemon.Text) ? 0 : Convert.ToDouble(txtLemon.Text);
                mbmp.TotalPouchProduction = string.IsNullOrEmpty(txtTotalPouchProduction.Text) ? 0 : Convert.ToDouble(txtTotalPouchProduction.Text);
                mbmp.Damage               = string.IsNullOrEmpty(txtDamage.Text) ? 0 : Convert.ToDouble(txtDamage.Text);
                mbmp.MixedAndTastedBy     = string.IsNullOrEmpty(txtMixedAndTastedBy.Text) ? string.Empty : txtMixedAndTastedBy.Text;
                mbmp.TastedAndMonitoredBy = string.IsNullOrEmpty(txtTastedAndMonitoredBy.Text) ? string.Empty : txtTastedAndMonitoredBy.Text;
                mbmp.flag                 = "Update";
                Result = bbmp.buttermilkdata(mbmp);
                if (Result > 0)
                {
                    divDanger.Visible  = false;
                    divwarning.Visible = false;

                    divSusccess.Visible = true;
                    lblSuccess.Text     = "Butter Milk Preparation Data Update  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;
            }
        }