Beispiel #1
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            qtyMdata = new MQuality();
            qtyBdata = new BQuality();
            //if (dpQCDetails.SelectedItem.Text == "Accepted" || dpQCDetails.SelectedItem.Text == "Rejected")
            //{
            int Result = 0;

            qtyMdata.QualityId = 0;
            qtyMdata.RMRId     = string.IsNullOrEmpty(hfrid.Value) ? 0 : Convert.ToInt32(hfrid.Value);
            //qtydata.QCId = string.IsNullOrEmpty(hId.Value) ? 0 : Convert.ToInt32(hId.Value);
            qtyMdata.RMRShiftId = Convert.ToInt32(dpShiftDetails.SelectedItem.Value);
            //qtyMdata.RMRDate = DateTime.Now.ToString();
            qtyMdata.QualityDate   = Convert.ToDateTime(txtDate.Text.ToString());
            qtyMdata.Temperature   = string.IsNullOrEmpty(txtTemperature.Text) ? 0 : Convert.ToDouble(txtTemperature.Text);
            qtyMdata.Alcohol       = string.IsNullOrEmpty(txtAlcohol.Text) ? 0 : Convert.ToDouble(txtAlcohol.Text);
            qtyMdata.Neutralizer   = string.IsNullOrEmpty(txtNeutralizer.Text) ? 0 : Convert.ToDouble(txtNeutralizer.Text);
            qtyMdata.Taste         = string.IsNullOrEmpty(txtTaste.Text) ? string.Empty : txtTaste.Text;
            qtyMdata.Smell         = string.IsNullOrEmpty(txtSmell.Text) ? string.Empty : txtSmell.Text;
            qtyMdata.Color         = string.IsNullOrEmpty(txtColor.Text) ? string.Empty : txtColor.Text;
            qtyMdata.Acidity       = string.IsNullOrEmpty(txtAcidity.Text) ? 0 : Convert.ToDouble(txtAcidity.Text);
            qtyMdata.HeatStability = string.IsNullOrEmpty(txtHeatStability.Text) ? 0 : Convert.ToDouble(txtHeatStability.Text);
            qtyMdata.Fat           = string.IsNullOrEmpty(txtFat.Text) ? 0 : Convert.ToDouble(txtFat.Text);
            qtyMdata.CLR           = string.IsNullOrEmpty(txtCLR.Text) ? 0 : Convert.ToDouble(txtCLR.Text);
            qtyMdata.SNF           = string.IsNullOrEmpty(txtSNF.Text) ? 0 : Convert.ToDouble(txtSNF.Text);
            qtyMdata.TestedBy      = string.IsNullOrEmpty(txtTestedBy.Text) ? string.Empty : txtTestedBy.Text;
            qtyMdata.VerifiedBy    = string.IsNullOrEmpty(txtVerifiedBy.Text) ? string.Empty : txtVerifiedBy.Text;
            qtyMdata.Others        = string.IsNullOrEmpty(txtOthers.Text) ? string.Empty : txtOthers.Text;
            qtyMdata.Remarks       = string.IsNullOrEmpty(txtRemarks.Text) ? string.Empty : txtRemarks.Text;
            qtyMdata.QCStatus      = Convert.ToInt32(dpQCDetails.SelectedItem.Value);
            qtyMdata.flag          = "Update";
            Result = qtyBdata.QualityData(qtyMdata);

            //btnRefresh_Click(sender, e);

            if (Result > 0)
            {
                divDanger.Visible   = false;
                divwarning.Visible  = false;
                divSusccess.Visible = true;
                RMRecieve R = new RMRecieve();
                R.RMRDate = Convert.ToDateTime(txtDate.Text);
                GetQualityDetails(R);
                uprouteList.Update();
                lblSuccess.Text = "QualityData Data Updated Successfully";
                pnlError.Update();
                ClearField();
            }
            else
            {
                divDanger.Visible   = false;
                divwarning.Visible  = true;
                divSusccess.Visible = false;
                lblSuccess.Text     = "Something went wrong plz contact site admin";
                pnlError.Update();
            }
        }
Beispiel #2
0
        public int QualityData(MQuality recieve)
        {
            daquality = new DAQuality();
            int Result = 0;

            try
            {
                Result = daquality.QualityData(recieve);
            }
            catch (Exception)
            {
                throw;
            }
            return(Result);
        }
Beispiel #3
0
        public int QualityData(MQuality receive)
        {
            int result = 0;

            try
            {
                DBParameterCollection paramcollection = new DBParameterCollection();
                //paramcollection.Add(new DBParameter("@QCId", receive.QCId));
                paramcollection.Add(new DBParameter("@RMRId", receive.RMRId));
                paramcollection.Add(new DBParameter("@QualityDate", receive.QualityDate));
                paramcollection.Add(new DBParameter("@RMRShiftId", receive.RMRShiftId));
                paramcollection.Add(new DBParameter("@Temperature", receive.Temperature));
                paramcollection.Add(new DBParameter("@Alcohol", receive.Alcohol));
                paramcollection.Add(new DBParameter("@Neutralizer", receive.Neutralizer));
                paramcollection.Add(new DBParameter("@Taste", receive.Taste));
                paramcollection.Add(new DBParameter("@Smell", receive.Smell));
                paramcollection.Add(new DBParameter("@Color", receive.Color));
                paramcollection.Add(new DBParameter("@Acidity", receive.Acidity));
                paramcollection.Add(new DBParameter("@HeatStability", receive.HeatStability));
                paramcollection.Add(new DBParameter("@Fat", receive.Fat));
                paramcollection.Add(new DBParameter("@CLR", receive.CLR));
                paramcollection.Add(new DBParameter("@SNF", receive.CLR));
                paramcollection.Add(new DBParameter("@TestedBy", receive.TestedBy));
                paramcollection.Add(new DBParameter("@VerifiedBy", receive.VerifiedBy));
                paramcollection.Add(new DBParameter("@Others", receive.Others));
                paramcollection.Add(new DBParameter("@Remarks", receive.Remarks));
                paramcollection.Add(new DBParameter("@QCStatus", receive.QCStatus));
                paramcollection.Add(new DBParameter("@flag", receive.flag));
                result = _DBHelper.ExecuteNonQuery("sp_Prod_QualityDetails", paramcollection, CommandType.StoredProcedure);
            }
            catch (Exception EX)
            {
                string MSG = EX.ToString();
            }
            return(result);
        }
Beispiel #4
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            try {
                qtyMdata = new MQuality();
                qtyBdata = new BQuality();
                //if (dpQCDetails.SelectedItem.Text == "Accepted" || dpQCDetails.SelectedItem.Text == "Rejected")
                //{
                int Result = 0;
                qtyMdata.QualityId = 0;

                qtyMdata.RMRId = string.IsNullOrEmpty(hfrid.Value) ? 0 : Convert.ToInt32(hfrid.Value);
                //qtydata.QCId = string.IsNullOrEmpty(hId.Value) ? 0 : Convert.ToInt32(hId.Value);
                qtyMdata.RMRShiftId = Convert.ToInt32(dpShiftDetails.SelectedItem.Value);
                //qtyMdata.RMRDate = DateTime.Now.ToString();
                qtyMdata.QualityDate   = Convert.ToDateTime(txtDate.Text.ToString());
                qtyMdata.Temperature   = string.IsNullOrEmpty(txtTemperature.Text) ? 0 : Convert.ToDouble(txtTemperature.Text);
                qtyMdata.Alcohol       = string.IsNullOrEmpty(txtAlcohol.Text) ? 0 : Convert.ToDouble(txtAlcohol.Text);
                qtyMdata.Neutralizer   = string.IsNullOrEmpty(txtNeutralizer.Text) ? 0 : Convert.ToDouble(txtNeutralizer.Text);
                qtyMdata.Taste         = string.IsNullOrEmpty(txtTaste.Text) ? string.Empty : txtTaste.Text;
                qtyMdata.Smell         = string.IsNullOrEmpty(txtSmell.Text) ? string.Empty : txtSmell.Text;
                qtyMdata.Color         = string.IsNullOrEmpty(txtColor.Text) ? string.Empty : txtColor.Text;
                qtyMdata.Acidity       = string.IsNullOrEmpty(txtAcidity.Text) ? 0 : Convert.ToDouble(txtAcidity.Text);
                qtyMdata.HeatStability = string.IsNullOrEmpty(txtHeatStability.Text) ? 0 : Convert.ToDouble(txtHeatStability.Text);
                qtyMdata.Fat           = string.IsNullOrEmpty(txtFat.Text) ? 0 : Convert.ToDouble(txtFat.Text);
                qtyMdata.CLR           = string.IsNullOrEmpty(txtCLR.Text) ? 0 : Convert.ToDouble(txtCLR.Text);
                qtyMdata.SNF           = string.IsNullOrEmpty(txtSNF.Text) ? 0 : Convert.ToDouble(txtSNF.Text);
                qtyMdata.TestedBy      = string.IsNullOrEmpty(txtTestedBy.Text) ? string.Empty : txtTestedBy.Text;
                qtyMdata.VerifiedBy    = string.IsNullOrEmpty(txtVerifiedBy.Text) ? string.Empty : txtVerifiedBy.Text;
                qtyMdata.Others        = string.IsNullOrEmpty(txtOthers.Text) ? string.Empty : txtOthers.Text;
                qtyMdata.Remarks       = string.IsNullOrEmpty(txtRemarks.Text) ? string.Empty : txtRemarks.Text;
                qtyMdata.QCStatus      = Convert.ToInt32(dpQCDetails.SelectedItem.Value);
                qtyMdata.flag          = "Insert";
                Result = qtyBdata.QualityData(qtyMdata);
                if (Result > 0)
                {
                    divDanger.Visible   = false;
                    divwarning.Visible  = false;
                    divSusccess.Visible = true;

                    ScriptManager.RegisterStartupScript(this, this.GetType(), "sel3", "$('#bx1').addClass('collapsed-box');", true);
                    //pnlError.Update();
                    ////string dates;
                    ////dates = string.IsNullOrEmpty(txtSearchDate.Text) ? string.Empty : Convert.ToDateTime(txtSearchDate.Text).ToString("dd-MM-yyyy");
                    //RMRecieve R = new RMRecieve();
                    //R.RMRDate = Convert.ToDateTime(txtSearchDate.Text);
                    //GetQualityDetails(R);
                    //uprouteList.Update();
                    //ClearField();
                    RMRecieve R = new RMRecieve();
                    R.RMRDate = Convert.ToDateTime(txtDate.Text);
                    GetQualityDetails(R);
                    uprouteList.Update();
                    lblSuccess.Text = "QualityData Added Successfully";
                    pnlError.Update();
                    ClearText();
                }
                else
                {
                    divDanger.Visible   = false;
                    divwarning.Visible  = true;
                    divSusccess.Visible = false;
                    lblSuccess.Text     = "Something went wrong plz contact site admin";
                    pnlError.Update();
                }
            }
            catch (FormatException EX)
            {
                string MSG = EX.ToString();
            }
        }