protected void btnAdd_Click(object sender, EventArgs e) { mqcp = new MQCAfterProcessing(); bqcp = new BQCAfterProcessing(); int Result = 0; mqcp.APQCId = 0; mqcp.RMRId = string.IsNullOrEmpty(hId.Value) ? 0 : Convert.ToInt32(hId.Value); mqcp.BatchCode = string.IsNullOrEmpty(txtBatchCode.Text) ? string.Empty : txtBatchCode.Text; mqcp.APQCDate = Convert.ToDateTime(txtDate.Text).ToString("dd-MM-yyyy"); mqcp.APQCShiftId = Convert.ToInt32(dpShiftDetails.SelectedItem.Value); mqcp.ProcessingTime = string.IsNullOrEmpty(txtProcessingTime.Text) ? string.Empty : txtProcessingTime.Text; mqcp.SiloNo = string.IsNullOrEmpty(txtSiloNo.Text) ? 0 : Convert.ToInt32(txtSiloNo.Text); mqcp.ProcessedQty = string.IsNullOrEmpty(txtProcessQty.Text) ? 0 : Convert.ToDouble(txtProcessQty.Text); mqcp.ProcessTemperature = string.IsNullOrEmpty(txtTemperature.Text) ? 0 : Convert.ToDouble(txtTemperature.Text); mqcp.OrganoSmell = string.IsNullOrEmpty(txtOrganolepticTestForSmell.Text) ? string.Empty : txtOrganolepticTestForSmell.Text; mqcp.OrganoTaste = string.IsNullOrEmpty(txtOrganolepticTestForTaste.Text) ? string.Empty : txtOrganolepticTestForTaste.Text; mqcp.OrganoColor = string.IsNullOrEmpty(txtOrganolepticTestForColour.Text) ? string.Empty : txtOrganolepticTestForColour.Text; mqcp.Acidity = string.IsNullOrEmpty(txtAcidity.Text) ? 0 : Convert.ToDouble(txtAcidity.Text); mqcp.PhosStartTime = string.IsNullOrEmpty(txtPhosphataseStartingTime.Text) ? string.Empty : txtPhosphataseStartingTime.Text; mqcp.PhosEndTime = string.IsNullOrEmpty(txtPhosphataseEndTime.Text) ? string.Empty : txtPhosphataseEndTime.Text; mqcp.PhosTotalHrs = string.IsNullOrEmpty(txtPhosphatasetotalhrs.Text) ? string.Empty : txtPhosphatasetotalhrs.Text; mqcp.MBRTStartTime = string.IsNullOrEmpty(txtMBRTStartTime.Text) ? string.Empty : txtMBRTStartTime.Text; mqcp.MBRTEndTime = string.IsNullOrEmpty(txtMBRTEndTime.Text) ? string.Empty : txtMBRTEndTime.Text; mqcp.MBRTTotalHrs = string.IsNullOrEmpty(txtMBRTTotalHours.Text) ? string.Empty : txtMBRTTotalHours.Text; mqcp.Fat = string.IsNullOrEmpty(txtFAT.Text) ? 0 : Convert.ToDouble(txtFAT.Text); mqcp.SNF = string.IsNullOrEmpty(txtSNF.Text) ? 0 : Convert.ToDouble(txtSNF.Text); mqcp.CLR = string.IsNullOrEmpty(txtCLR.Text) ? 0 : Convert.ToDouble(txtCLR.Text); mqcp.HomEfficiency = string.IsNullOrEmpty(txtHomEfficiency.Text) ? string.Empty : txtHomEfficiency.Text; mqcp.AfterProcessingStatusId = Convert.ToInt32(dpAfterProcessingStatus.SelectedItem.Value); mqcp.flag = "Insert"; Result = bqcp.AfterProcessingQcData(mqcp); 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; //dates = string.IsNullOrEmpty(txtSearchDate.Text) ? string.Empty : Convert.ToDateTime(txtSearchDate.Text).ToString("dd-MM-yyyy"); //GetQCProcssingDetails(dates); RMRecieve R = new RMRecieve(); R.RMRDate = Convert.ToDateTime(txtSearchDate.Text); GetQCProcssingDetails(R); uprouteList.Update(); lblSuccess.Text = "PasteurizationProcess Data Add Successfully"; pnlError.Update(); } else { divDanger.Visible = false; divwarning.Visible = true; divSusccess.Visible = false; lblSuccess.Text = "Something went wrong plz contact site admin"; pnlError.Update(); } }
public int AfterProcessingQcData(MQCAfterProcessing receive) { daqc = new DAQCAfterProcessing(); int Result = 0; try { Result = daqc.AfterProcessingQcData(receive); } catch (Exception) { throw; } return(Result); }
public int AfterProcessingQcData(MQCAfterProcessing receive) { int result = 0; try { DBParameterCollection paramcollection = new DBParameterCollection(); paramcollection.Add(new DBParameter("@RMRId", receive.RMRId)); paramcollection.Add(new DBParameter("@BatchCode", receive.BatchCode)); paramcollection.Add(new DBParameter("@APQCDate", receive.APQCDate)); paramcollection.Add(new DBParameter("@APQCShiftId", receive.APQCShiftId)); paramcollection.Add(new DBParameter("@ProcessingTime", receive.ProcessingTime)); paramcollection.Add(new DBParameter("@SiloNo", receive.SiloNo)); paramcollection.Add(new DBParameter("@ProcessedQty", receive.ProcessedQty)); paramcollection.Add(new DBParameter("@ProcessTemperature", receive.ProcessTemperature)); paramcollection.Add(new DBParameter("@OrganoSmell", receive.OrganoSmell)); paramcollection.Add(new DBParameter("@OrganoTaste", receive.OrganoTaste)); paramcollection.Add(new DBParameter("@OrganoColor", receive.OrganoColor)); paramcollection.Add(new DBParameter("@Acidity", receive.Acidity)); paramcollection.Add(new DBParameter("@PhosStartTime", receive.PhosStartTime)); paramcollection.Add(new DBParameter("@PhosEndTime", receive.PhosEndTime)); paramcollection.Add(new DBParameter("@PhosTotalHrs", receive.PhosTotalHrs)); paramcollection.Add(new DBParameter("@MBRTStartTime", receive.MBRTStartTime)); paramcollection.Add(new DBParameter("@MBRTEndTime", receive.MBRTEndTime)); paramcollection.Add(new DBParameter("@MBRTTotalHrs", receive.MBRTTotalHrs)); paramcollection.Add(new DBParameter("@Fat", receive.Fat)); paramcollection.Add(new DBParameter("@CLR", receive.CLR)); paramcollection.Add(new DBParameter("@SNF", receive.SNF)); paramcollection.Add(new DBParameter("@HomEfficiency", receive.HomEfficiency)); paramcollection.Add(new DBParameter("@AfterProcessingStatusId", receive.AfterProcessingStatusId)); paramcollection.Add(new DBParameter("@flag", receive.flag)); result = _DBHelper.ExecuteNonQuery("sp_Prod_QCAfterProcessingDetails", paramcollection, CommandType.StoredProcedure); } catch (Exception EX) { string MSG = EX.ToString(); } return(result); }