protected void btnUpdateCurdProcessQCdetail_Click(object sender, EventArgs e) { MCQCdata = new MCurdProcessingQC(); BCQCdata = new BCurdProcessingQC(); int Result = 0; MCQCdata.RMRId = string.IsNullOrEmpty(hId.Value) ? 0 : Convert.ToInt32(hId.Value); MCQCdata.BatchNo = string.IsNullOrEmpty(txtBatchNo.Text) ? string.Empty : txtBatchNo.Text; MCQCdata.CurdQCDate = Convert.ToDateTime(txtCurdQCDate.Text).ToString("dd-MM-yyyy"); MCQCdata.CurdQCShiftId = Convert.ToInt32(dpCurdQCShift.SelectedItem.Value); MCQCdata.CurdQCProcessTime = string.IsNullOrEmpty(txtProcessingTime.Text) ? string.Empty : txtProcessingTime.Text; MCQCdata.CurdQCSiloNo = Convert.ToInt32(txtSiloNo.Text); MCQCdata.CurdQCProcessQty = string.IsNullOrEmpty(txtProcessQty.Text) ? 0 : Convert.ToDouble(txtProcessQty.Text); MCQCdata.CurdQCTemp = string.IsNullOrEmpty(txtTemperature.Text) ? 0 : Convert.ToDouble(txtTemperature.Text); MCQCdata.CurdQCFat = string.IsNullOrEmpty(txtFat.Text) ? 0 : Convert.ToDouble(txtFat.Text); MCQCdata.CurdQCCLR = string.IsNullOrEmpty(txtCLR.Text) ? 0 : Convert.ToDouble(txtCLR.Text); MCQCdata.CurdQCSNF = string.IsNullOrEmpty(txtSNF.Text) ? 0 : Convert.ToDouble(txtSNF.Text); MCQCdata.CurdQCAcidity = string.IsNullOrEmpty(txtAcidity.Text) ? 0 : Convert.ToDouble(txtAcidity.Text); MCQCdata.HomEfficiency = string.IsNullOrEmpty(txtHomEfficiency.Text) ? string.Empty : txtHomEfficiency.Text; MCQCdata.CurdQCTaste = string.IsNullOrEmpty(txtTaste.Text) ? string.Empty : txtTaste.Text; MCQCdata.CurdQCSmell = string.IsNullOrEmpty(txtSmell.Text) ? string.Empty : txtSmell.Text; MCQCdata.CurdQCColor = string.IsNullOrEmpty(txtColor.Text) ? string.Empty : txtColor.Text; MCQCdata.PhosphataseStartTime = string.IsNullOrEmpty(txtPhosphataseStartTime.Text) ? string.Empty : txtPhosphataseStartTime.Text; MCQCdata.PhosphataseEndTime = string.IsNullOrEmpty(txtPhosphataseEndTime.Text) ? string.Empty : txtPhosphataseEndTime.Text; MCQCdata.PhosphataseTotalHours = string.IsNullOrEmpty(txtPhosphataseTotalHours.Text) ? string.Empty : txtPhosphataseTotalHours.Text; MCQCdata.CurdQCMBRTStartTime = string.IsNullOrEmpty(txtMBRTStartTime.Text) ? string.Empty : txtMBRTStartTime.Text; MCQCdata.CurdQCMBRTEndTime = string.IsNullOrEmpty(txtMBRTEndTime.Text) ? string.Empty : txtMBRTEndTime.Text; MCQCdata.CurdQCMBRTTotalHours = string.IsNullOrEmpty(txtMBRTTotalHours.Text) ? string.Empty : txtMBRTTotalHours.Text; MCQCdata.CurdQCStatusId = Convert.ToInt32(dpQCDetails.SelectedItem.Value); MCQCdata.flag = "Update"; Result = BCQCdata.CurdProcessQCData(MCQCdata); 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"); //GetCurdProcessQCDetails(dates); RMRecieve R = new RMRecieve(); R.RMRDate = Convert.ToDateTime(txtSearchDate.Text); GetCurdProcessQCDetails(R); uprouteList.Update(); lblSuccess.Text = "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(); } }
public int CurdProcessQCData(MCurdProcessingQC receive) { dacurdprocessqc = new DACurdProcessingQC(); int Result = 0; try { Result = dacurdprocessqc.CurdProcessQCData(receive); } catch (Exception) { throw; } return(Result); }
public int CurdProcessQCData(MCurdProcessingQC recieve) { int result = 0; try { DBParameterCollection paramCollection = new DBParameterCollection(); paramCollection.Add(new DBParameter("@CurdQCId", recieve.CurdQCId)); paramCollection.Add(new DBParameter("@CurdId", recieve.CurdId)); paramCollection.Add(new DBParameter("@RMRId", recieve.RMRId)); paramCollection.Add(new DBParameter("@BatchNo", recieve.BatchNo)); paramCollection.Add(new DBParameter("@CurdQCDate", recieve.CurdQCDate)); paramCollection.Add(new DBParameter("@CurdQCShiftId", recieve.CurdQCShiftId)); paramCollection.Add(new DBParameter("@CurdQCProcessTime", recieve.CurdQCProcessTime)); paramCollection.Add(new DBParameter("@CurdQCSiloNo", recieve.CurdQCSiloNo)); paramCollection.Add(new DBParameter("@CurdQCProcessQty", recieve.CurdQCProcessQty)); paramCollection.Add(new DBParameter("@CurdQCTemp", recieve.CurdQCTemp)); paramCollection.Add(new DBParameter("@CurdQCFat", recieve.CurdQCFat)); paramCollection.Add(new DBParameter("@CurdQCCLR", recieve.CurdQCCLR)); paramCollection.Add(new DBParameter("@CurdQCSNF", recieve.CurdQCSNF)); paramCollection.Add(new DBParameter("@CurdQCAcidity", recieve.CurdQCAcidity)); paramCollection.Add(new DBParameter("@HomEfficiency", recieve.HomEfficiency)); paramCollection.Add(new DBParameter("@CurdQCTaste", recieve.CurdQCTaste)); paramCollection.Add(new DBParameter("@CurdQCSmell", recieve.CurdQCSmell)); paramCollection.Add(new DBParameter("@CurdQCColor", recieve.CurdQCColor)); paramCollection.Add(new DBParameter("@CurdQCMBRTStartTime", recieve.CurdQCMBRTStartTime)); paramCollection.Add(new DBParameter("@CurdQCMBRTEndTime", recieve.CurdQCMBRTEndTime)); paramCollection.Add(new DBParameter("@CurdQCMBRTTotalHours", recieve.CurdQCMBRTTotalHours)); paramCollection.Add(new DBParameter("@PhosphataseStartTime", recieve.PhosphataseStartTime)); paramCollection.Add(new DBParameter("@PhosphataseEndTime", recieve.PhosphataseEndTime)); paramCollection.Add(new DBParameter("@PhosphataseTotalHours", recieve.PhosphataseTotalHours)); paramCollection.Add(new DBParameter("@CurdQCStatusId", recieve.CurdQCStatusId)); paramCollection.Add(new DBParameter("@flag", recieve.flag)); result = _DBHelper.ExecuteNonQuery("sp_Prod_CurdProcessingQC", paramCollection, CommandType.StoredProcedure); } catch (Exception EX) { string MSG = EX.ToString(); } return(result); }