Пример #1
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            mftp = new MEffluentTreatmentPlant();
            bftp = new BEffluentTreatmentPlant();
            int Result = 0;

            mftp.EffluentTreatmentPlantId      = 0;
            mftp.EffluentTreatmentPlantDate    = Convert.ToDateTime(txtDate.Text.ToString());
            mftp.EffluentTreatmentPlantShiftId = Convert.ToInt32(dpShiftDetails.SelectedItem.Value);
            mftp.OperatedBy = string.IsNullOrEmpty(txtOperatedBy.Text) ? string.Empty : txtOperatedBy.Text;
            mftp.Remarks    = string.IsNullOrEmpty(txtRemarks.Text) ? string.Empty : txtRemarks.Text;
            mftp.CollectionPumpAStartingTime      = string.IsNullOrEmpty(txtAStartingTime.Text) ? string.Empty : txtAStartingTime.Text;
            mftp.CollectionPumpAEndTime           = string.IsNullOrEmpty(txtAEndTime.Text) ? string.Empty : txtAEndTime.Text;
            mftp.CollectionPumpATotalRunningHours = string.IsNullOrEmpty(txtATotalHours.Text) ? string.Empty : txtATotalHours.Text;
            mftp.CollectionPumpBStartingTime      = string.IsNullOrEmpty(txtBStartingTime.Text) ? string.Empty : txtBStartingTime.Text;
            mftp.CollectionPumpBEndTime           = string.IsNullOrEmpty(txtBEndTime.Text) ? string.Empty : txtBEndTime.Text;
            mftp.CollectionPumpBTotalRunningHours = string.IsNullOrEmpty(txtBTotalHours.Text) ? string.Empty : txtBTotalHours.Text;
            mftp.AERATORStartingTime                       = string.IsNullOrEmpty(txtAERATORStartingTime.Text) ? string.Empty : txtAERATORStartingTime.Text;
            mftp.AERATOREndTime                            = string.IsNullOrEmpty(txtAERATOREndTime.Text) ? string.Empty : txtAERATOREndTime.Text;
            mftp.AERATORTotalRunningHours                  = string.IsNullOrEmpty(txtAERATORTotalHours.Text) ? string.Empty : txtAERATORTotalHours.Text;
            mftp.BLOWERAStartingTime                       = string.IsNullOrEmpty(txtBLOWERAStartingTime.Text) ? string.Empty : txtBLOWERAStartingTime.Text;
            mftp.BLOWERAEndTime                            = string.IsNullOrEmpty(txtBLOWERAEndTime.Text) ? string.Empty : txtBLOWERAEndTime.Text;
            mftp.BLOWERATotalRunningHours                  = string.IsNullOrEmpty(txtBLOWERATotalHours.Text) ? string.Empty : txtBLOWERATotalHours.Text;
            mftp.BLOWERBStartingTime                       = string.IsNullOrEmpty(txtBLOWERBStartingTime.Text) ? string.Empty : txtBLOWERBStartingTime.Text;
            mftp.BLOWERBEndTime                            = string.IsNullOrEmpty(txtBLOWERBEndTime.Text) ? string.Empty : txtBLOWERBEndTime.Text;
            mftp.BLOWERBTotalRunningHours                  = string.IsNullOrEmpty(txtBLOWERBTotalHours.Text) ? string.Empty : txtBLOWERBTotalHours.Text;
            mftp.ClarifierMechanismStartingTime            = string.IsNullOrEmpty(txtClarifierMechanismStartingTime.Text) ? string.Empty : txtClarifierMechanismStartingTime.Text;
            mftp.ClarifierMechanismEndTime                 = string.IsNullOrEmpty(txtClarifierMechanismEndTime.Text) ? string.Empty : txtClarifierMechanismEndTime.Text;
            mftp.ClarifierMechanismTotalRunningHours       = string.IsNullOrEmpty(txtClarifierMechanismTotalHours.Text) ? string.Empty : txtClarifierMechanismTotalHours.Text;
            mftp.SludgeReCirculationPumpAStartingTime      = string.IsNullOrEmpty(txtSludgeReCirculationpumpAStartingTime.Text) ? string.Empty : txtSludgeReCirculationpumpAStartingTime.Text;
            mftp.SludgeReCirculationPumpAEndTime           = string.IsNullOrEmpty(txtSludgeReCirculationpumpAEndTime.Text) ? string.Empty : txtSludgeReCirculationpumpAEndTime.Text;
            mftp.SludgeReCirculationPumpATotalRunningHours = string.IsNullOrEmpty(txtSludgeReCirculationpumpATotalHours.Text) ? string.Empty : txtSludgeReCirculationpumpATotalHours.Text;
            mftp.SludgeReCirculationPumpBStartingTime      = string.IsNullOrEmpty(txtSludgeReCirculationpumpBStartingTime.Text) ? string.Empty : txtSludgeReCirculationpumpBStartingTime.Text;
            mftp.SludgeReCirculationPumpBEndTime           = string.IsNullOrEmpty(txtSludgeReCirculationpumpBEndTime.Text) ? string.Empty : txtSludgeReCirculationpumpBEndTime.Text;
            mftp.SludgeReCirculationPumpBTotalRunningHours = string.IsNullOrEmpty(txtSludgeReCirculationpumpBTotalHours.Text) ? string.Empty : txtSludgeReCirculationpumpBTotalHours.Text;
            mftp.flag = "insert";
            Result    = bftp.effluntplantdata(mftp);
            if (Result > 0)
            {
                divDanger.Visible  = false;
                divwarning.Visible = false;

                divSusccess.Visible = true;
                lblSuccess.Text     = "Effluent Treatment Plant Data Added  Successfully";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "sel3", "$('#bx2').removeClass('collapsed-box');", true);
                pnlError.Update();
            }
            else
            {
                divDanger.Visible   = false;
                divwarning.Visible  = true;
                divSusccess.Visible = false;
                lblSuccess.Text     = "Something went wrong plz contact site admin";
                pnlError.Update();
            }
        }
Пример #2
0
        public int effluntplantdata(MEffluentTreatmentPlant receive)
        {
            daftp = new DAEffluentTreatmentPlant();
            int Result = 0;

            try
            {
                Result = daftp.effluntplantdata(receive);
            }
            catch (Exception)
            {
                throw;
            }
            return(Result);
        }
Пример #3
0
        public int effluntplantdata(MEffluentTreatmentPlant receive)
        {
            int result = 0;

            try
            {
                DBParameterCollection paramcollection = new DBParameterCollection();
                paramcollection.Add(new DBParameter("EffluentTreatmentPlantId", receive.EffluentTreatmentPlantId));
                paramcollection.Add(new DBParameter("EffluentTreatmentPlantDate", receive.EffluentTreatmentPlantDate));
                paramcollection.Add(new DBParameter("EffluentTreatmentPlantShiftId", receive.EffluentTreatmentPlantShiftId));
                paramcollection.Add(new DBParameter("OperatedBy", receive.OperatedBy));
                paramcollection.Add(new DBParameter("Remarks", receive.Remarks));
                paramcollection.Add(new DBParameter("CollectionPumpAStartingTime", receive.CollectionPumpAStartingTime));
                paramcollection.Add(new DBParameter("CollectionPumpAEndTime", receive.CollectionPumpAEndTime));
                paramcollection.Add(new DBParameter("CollectionPumpATotalRunningHours", receive.CollectionPumpATotalRunningHours));
                paramcollection.Add(new DBParameter("CollectionPumpBStartingTime", receive.CollectionPumpBStartingTime));
                paramcollection.Add(new DBParameter("CollectionPumpBEndTime", receive.CollectionPumpBEndTime));
                paramcollection.Add(new DBParameter("CollectionPumpBTotalRunningHours", receive.CollectionPumpBTotalRunningHours));
                paramcollection.Add(new DBParameter("AERATORStartingTime", receive.AERATORStartingTime));
                paramcollection.Add(new DBParameter("AERATOREndTime", receive.AERATOREndTime));
                paramcollection.Add(new DBParameter("AERATORTotalRunningHours", receive.AERATORTotalRunningHours));
                paramcollection.Add(new DBParameter("BLOWERAStartingTime", receive.BLOWERAStartingTime));
                paramcollection.Add(new DBParameter("BLOWERAEndTime", receive.BLOWERAEndTime));
                paramcollection.Add(new DBParameter("BLOWERATotalRunningHours", receive.BLOWERATotalRunningHours));
                paramcollection.Add(new DBParameter("BLOWERBStartingTime", receive.BLOWERBStartingTime));
                paramcollection.Add(new DBParameter("BLOWERBEndTime", receive.BLOWERBEndTime));
                paramcollection.Add(new DBParameter("BLOWERBTotalRunningHours", receive.BLOWERBTotalRunningHours));
                paramcollection.Add(new DBParameter("ClarifierMechanismStartingTime", receive.ClarifierMechanismStartingTime));
                paramcollection.Add(new DBParameter("ClarifierMechanismEndTime", receive.ClarifierMechanismEndTime));
                paramcollection.Add(new DBParameter("ClarifierMechanismTotalRunningHours", receive.ClarifierMechanismTotalRunningHours));
                paramcollection.Add(new DBParameter("SludgeReCirculationPumpAStartingTime", receive.SludgeReCirculationPumpAStartingTime));
                paramcollection.Add(new DBParameter("SludgeReCirculationPumpAEndTime", receive.SludgeReCirculationPumpAEndTime));
                paramcollection.Add(new DBParameter("SludgeReCirculationPumpATotalRunningHours", receive.SludgeReCirculationPumpATotalRunningHours));
                paramcollection.Add(new DBParameter("SludgeReCirculationPumpBStartingTime", receive.SludgeReCirculationPumpBStartingTime));
                paramcollection.Add(new DBParameter("SludgeReCirculationPumpBEndTime", receive.SludgeReCirculationPumpBEndTime));
                paramcollection.Add(new DBParameter("SludgeReCirculationPumpBTotalRunningHours", receive.SludgeReCirculationPumpBTotalRunningHours));
                paramcollection.Add(new DBParameter("@flag", receive.flag));
                result = _DBHelper.ExecuteNonQuery("sp_Prod_EffluentTreatmentPlantDetails", paramcollection, CommandType.StoredProcedure);
            }
            catch (Exception EX)
            {
                string MSG = EX.ToString();
            }
            return(result);
        }