public int icecreamdata(MIceCreamColdRoomTemperature receive) { int result = 0; try { DBParameterCollection paramcollection = new DBParameterCollection(); paramcollection.Add(new DBParameter("@IceCreamColdRoomTemperatureId", receive.IceCreamColdRoomTemperatureId)); paramcollection.Add(new DBParameter("@RMRId", receive.RMRId)); paramcollection.Add(new DBParameter("@IceCreamColdRoomTemperatureDate", receive.IceCreamColdRoomTemperatureDate)); paramcollection.Add(new DBParameter("@IceCreamColdRoomTemperatureShiftId", receive.IceCreamColdRoomTemperatureShiftId)); paramcollection.Add(new DBParameter("@HardeningRoom", receive.HardeningRoom)); paramcollection.Add(new DBParameter("@AgingTank", receive.AgingTank)); paramcollection.Add(new DBParameter("@CandyTank", receive.CandyTank)); paramcollection.Add(new DBParameter("@ColdStorageRoom", receive.ColdStorageRoom)); paramcollection.Add(new DBParameter("@IBTTemperature", receive.IBTTemperature)); paramcollection.Add(new DBParameter("@CheckedBy", receive.CheckedBy)); paramcollection.Add(new DBParameter("@verifierBy", receive.verifierBy)); paramcollection.Add(new DBParameter("@BreakAndDownServices", receive.BreakAndDownServices)); paramcollection.Add(new DBParameter("@flag", receive.flag)); result = _DBHelper.ExecuteNonQuery("sp_Prod_IceCreamRoomTemperaturDetails", paramcollection, CommandType.StoredProcedure); } catch (Exception EX) { string MSG = EX.ToString(); } return(result); }
public int icecreamdata(MIceCreamColdRoomTemperature receive) { daict = new DAIceCreamColdRoomTemperature(); int Result = 0; try { Result = daict.icecreamdata(receive); } catch (Exception) { throw; } return(Result); }
protected void btnUpdate_Click(object sender, EventArgs e) { mict = new MIceCreamColdRoomTemperature(); bict = new BIceCreamColdRoomTemperature(); int Result = 0; mict.IceCreamColdRoomTemperatureId = 0; mict.RMRId = string.IsNullOrEmpty(hId.Value)?0:Convert.ToInt32(hId.Value); mict.IceCreamColdRoomTemperatureDate = Convert.ToDateTime(txtDate.Text.ToString()); mict.IceCreamColdRoomTemperatureShiftId = Convert.ToInt32(dpShiftDetails.SelectedItem.Value); mict.HardeningRoom = string.IsNullOrEmpty(txtHardeningRoom.Text) ? string.Empty : txtHardeningRoom.Text; mict.AgingTank = string.IsNullOrEmpty(txtAgingTank.Text)?string.Empty:txtAgingTank.Text; mict.CandyTank = string.IsNullOrEmpty(txtCandyTank.Text)?string.Empty:txtCandyTank.Text; mict.ColdStorageRoom = string.IsNullOrEmpty(txtColdStorageRoom.Text)?string.Empty:txtColdStorageRoom.Text; mict.IBTTemperature = string.IsNullOrEmpty(txtIBTTemperature.Text)?0:Convert.ToDouble(txtIBTTemperature.Text); mict.CheckedBy = string.IsNullOrEmpty(txtCheckedBy.Text)?string.Empty:txtCheckedBy.Text; mict.verifierBy = string.IsNullOrEmpty(txtverifierBy.Text)?string.Empty:txtverifierBy.Text; mict.BreakAndDownServices = string.IsNullOrEmpty(txtBreakAndDownServices.Text)?string.Empty:txtBreakAndDownServices.Text; mict.flag = "Update"; Result = bict.icecreamdata(mict); if (Result > 0) { divDanger.Visible = false; divwarning.Visible = false; divSusccess.Visible = true; lblSuccess.Text = "IceCream ColdRoom Temperature 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(); } }