Ejemplo n.º 1
0
        public bool Save(KeystoneProject.Models.Master.SMSSetting objSMSSetting)
        {
            try
            {
                HospitalLocationID();
                Connect();
                con.Open();
                SqlCommand cmd = new SqlCommand("IUMobileSMS", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@HospitalID", HospitalID);
                cmd.Parameters.AddWithValue("@LocationID", LocationID);
                cmd.Parameters.AddWithValue("@MobileSMSID", objSMSSetting.MobileSMSID);
                cmd.Parameters.AddWithValue("@IPDAddimisionDrSMS", objSMSSetting.IPDAddimisionDrSMS);
                cmd.Parameters.AddWithValue("@IPDDischargeDrSMS", objSMSSetting.IPDDischargeDrSMS);
                cmd.Parameters.AddWithValue("@IPDAddimisionPSMS", objSMSSetting.IPDAddimisionPSMS);
                cmd.Parameters.AddWithValue("@OPDRegDrSMS", objSMSSetting.OPDRegDrSMS);
                cmd.Parameters.AddWithValue("@IPDDischargePSMS", objSMSSetting.IPDDischargePSMS);
                cmd.Parameters.AddWithValue("@IPDAddimisionCDrSMS", objSMSSetting.IPDAddimisionCDrSMS);
                cmd.Parameters.AddWithValue("@IPDDischargeCDrSMS", objSMSSetting.IPDDischargeCDrSMS);
                cmd.Parameters.AddWithValue("@AppointmentPSMS", objSMSSetting.AppointmentPSMS);
                cmd.Parameters.AddWithValue("@AppointmentCDrSMS", objSMSSetting.AppointmentCDrSMS);
                cmd.Parameters.AddWithValue("@IPDAddimisionDr", "");
                cmd.Parameters.AddWithValue("@OPDBillDr", "");
                cmd.Parameters.AddWithValue("@IPDBillDr", "");
                cmd.Parameters.AddWithValue("@IPDFinalBillDr", "");
                cmd.Parameters.AddWithValue("@IPDDischargeDr", "");
                cmd.Parameters.AddWithValue("@IPDAddimisionP", "");
                cmd.Parameters.AddWithValue("@OPDRegDr", "");
                cmd.Parameters.AddWithValue("@IPDBillP", "");
                cmd.Parameters.AddWithValue("@IPDFinalBillP", "");
                cmd.Parameters.AddWithValue("@IPDDischargeP", "");
                cmd.Parameters.AddWithValue("@IPDAddimisionCDr", "");
                cmd.Parameters.AddWithValue("@IPDDischargeCDr", "");
                cmd.Parameters.AddWithValue("@AppointmentP", "");
                cmd.Parameters.AddWithValue("@AppointmentCDr", "");
                cmd.Parameters.AddWithValue("@OPDBillDrSMS", "");
                cmd.Parameters.AddWithValue("@IPDBillDrSMS", "");
                cmd.Parameters.AddWithValue("@IPDFinalBillDrSMS", "");
                cmd.Parameters.AddWithValue("@IPDBillPSMS", "");
                cmd.Parameters.AddWithValue("@IPDFinalBillPSMS", "");


                cmd.Parameters.AddWithValue("@Mode", objSMSSetting.Mode);
                int i = cmd.ExecuteNonQuery();



                con.Close();
            }
            catch (Exception ex)
            {
                return(false);

                ExceptionManager.Publish(ex);
                throw ex;
            }
            return(true);
        }
        public ActionResult SMSSetting(KeystoneProject.Models.Master.SMSSetting SMSSetting)
        {
            ViewData["smssave"] = "0";

            Buisness_Logic.Master.BL_SMSSetting setting  = new Buisness_Logic.Master.BL_SMSSetting();
            Buisness_Logic.Master.BL_SMSSetting setting1 = new Buisness_Logic.Master.BL_SMSSetting();
            SMSSetting.dsparamiter = setting.GetMasterSmsDetails();

            SMSSetting.dsparamiter1 = setting1.GetSMSSetting();

            if (SMSSetting.dsparamiter.Tables[1].Rows.Count != 0)
            {
                SMSSetting.MobileSMSID = Convert.ToInt32(SMSSetting.dsparamiter.Tables[1].Rows[0]["MobileSMSID"].ToString());

                SMSSetting.IPDAddimisionDrSMS  = SMSSetting.dsparamiter.Tables[1].Rows[0]["IPDAddimisionDrSMS"].ToString();
                SMSSetting.IPDDischargeDrSMS   = SMSSetting.dsparamiter.Tables[1].Rows[0]["IPDDischargeDrSMS"].ToString();
                SMSSetting.IPDAddimisionPSMS   = SMSSetting.dsparamiter.Tables[1].Rows[0]["IPDAddimisionPSMS"].ToString();
                SMSSetting.OPDRegDrSMS         = SMSSetting.dsparamiter.Tables[1].Rows[0]["OPDRegDrSMS"].ToString();
                SMSSetting.IPDDischargePSMS    = SMSSetting.dsparamiter.Tables[1].Rows[0]["IPDDischargePSMS"].ToString();
                SMSSetting.IPDAddimisionCDrSMS = SMSSetting.dsparamiter.Tables[1].Rows[0]["IPDAddimisionCDrSMS"].ToString();
                SMSSetting.IPDDischargeCDrSMS  = SMSSetting.dsparamiter.Tables[1].Rows[0]["IPDDischargeCDrSMS"].ToString();
                SMSSetting.AppointmentPSMS     = SMSSetting.dsparamiter.Tables[1].Rows[0]["AppointmentPSMS"].ToString();
                SMSSetting.AppointmentCDrSMS   = SMSSetting.dsparamiter.Tables[1].Rows[0]["AppointmentCDrSMS"].ToString();
                //    SMSSetting.IPDDischargeP = SMSSetting.dsparamiter.Tables[1].Rows[0]["IPDDischargeP"].ToString();
                //    SMSSetting.IPDAdmissionCDr = SMSSetting.dsparamiter.Tables[1].Rows[0]["IPDAddimisionCDr"].ToString();
                //    SMSSetting.IPDDischargeCDr = SMSSetting.dsparamiter.Tables[1].Rows[0]["IPDDischargeCDr"].ToString();
                //    SMSSetting.AppointmentP = SMSSetting.dsparamiter.Tables[1].Rows[0]["AppointmentP"].ToString();
                //    SMSSetting.AppointmentCDr = SMSSetting.dsparamiter.Tables[1].Rows[0]["AppointmentCDr"].ToString();
            }

            if (SMSSetting.dsparamiter1.Tables[0].Rows.Count != 0)
            {
                SMSSetting.MasterSettingID        = Convert.ToInt32(SMSSetting.dsparamiter1.Tables[0].Rows[0]["MasterSettingID"].ToString());
                SMSSetting.chkIPDAddimisionDrSMS  = Convert.ToBoolean(SMSSetting.dsparamiter1.Tables[0].Rows[0]["IPDAddimisionDrSMS"].ToString());
                SMSSetting.chkIPDDischargeDrSMS   = Convert.ToBoolean(SMSSetting.dsparamiter1.Tables[0].Rows[0]["IPDDischargeDrSMS"].ToString());
                SMSSetting.chkIPDAddimisionPSMS   = Convert.ToBoolean(SMSSetting.dsparamiter1.Tables[0].Rows[0]["IPDAddimisionPSMS"].ToString());
                SMSSetting.chkOPDRegDrSMS         = Convert.ToBoolean(SMSSetting.dsparamiter1.Tables[0].Rows[0]["OPDRegDrSMS"].ToString());
                SMSSetting.chkIPDDischargePSMS    = Convert.ToBoolean(SMSSetting.dsparamiter1.Tables[0].Rows[0]["IPDDischargePSMS"].ToString());
                SMSSetting.chkIPDAddimisionCDrSMS = Convert.ToBoolean(SMSSetting.dsparamiter1.Tables[0].Rows[0]["IPDAddimisionCDrSMS"].ToString());
                SMSSetting.chkIPDDischargeCDrSMS  = Convert.ToBoolean(SMSSetting.dsparamiter1.Tables[0].Rows[0]["IPDDischargeCDrSMS"].ToString());
                SMSSetting.chkAppointmentPSMS     = Convert.ToBoolean(SMSSetting.dsparamiter1.Tables[0].Rows[0]["AppointmentPSMS"].ToString());
                SMSSetting.chkAppointmentCDrSMS   = Convert.ToBoolean(SMSSetting.dsparamiter1.Tables[0].Rows[0]["AppointmentCDrSMS"].ToString());
            }

            return(View(SMSSetting));
        }