Esempio n. 1
0
        public void UpdateData(string user, PhysicianFacilityModel oClass)
        {
            strSql = "UPDATE " + TABLE_PHYSICIAN_FACILITY + " SET " +
                     COLUMN_PHYSICIAN_ID + " = '" + oClass.PhysicianID + "', " +
                     COLUMN_HOSPITAL_ID + " = '" + oClass.HospitalID + "', " +
                     " updated_by = '" + user + "', " +
                     " updated_date = '" + DateTime.Now.ToString("yyyy-MM-d HH:MM:ss") + "' " +
                     " WHERE " + COLUMN_ID + " = '" + oClass.ID + "' ";

            SaveData(strSql);
        }
Esempio n. 2
0
        public void DeleteData(string user, PhysicianFacilityModel oClass)
        {
            strSql = "UPDATE " + TABLE_PHYSICIAN_FACILITY + " SET " +
                     " isDeleted = 1, " +
                     " ReasonDelete = '" + oClass.ReasonDelete.Replace("'", "''") + "', " +
                     " updated_by = '" + user + "', " +
                     " updated_date = '" + DateTime.Now.ToString("yyyy-MM-d HH:MM:ss") + "' " +
                     " WHERE " + COLUMN_ID + " = '" + oClass.ID + "' ";

            SaveData(strSql);
        }
Esempio n. 3
0
        protected void AddPhysicianFacility_ServerClick(object sender, EventArgs e)
        {
            string sUserName = Session["User"].ToString();

            PhysicianFacilityDAL   oPhysicianFacilityDAL   = new PhysicianFacilityDAL();
            PhysicianFacilityModel oPhysicianFacilityClass = new PhysicianFacilityModel();

            oPhysicianFacilityClass.PhysicianID = Convert.ToInt32(PhysicianID.Value);
            oPhysicianFacilityClass.HospitalID  = Convert.ToInt32(ddlHospitalName.SelectedValue);
            oPhysicianFacilityDAL.InsertData(sUserName, oPhysicianFacilityClass);

            PopulatePhysicianFacility(Convert.ToInt16(PhysicianID.Value));
        }
Esempio n. 4
0
        protected void DeletePhysicianFacility_ServerClick(object sender, EventArgs e)
        {
            string UserName = Session["User"].ToString();
            int    ID       = Convert.ToInt32(HiddenFieldPhysicianFacility.Value);

            PhysicianFacilityDAL   oPhysicianFacilityDAL   = new PhysicianFacilityDAL();
            PhysicianFacilityModel oPhysicianFacilityClass = new PhysicianFacilityModel();

            oPhysicianFacilityClass.IsDeleted    = true;
            oPhysicianFacilityClass.ReasonDelete = deletePhysicianFacilityReason.InnerText;
            string lbl = lblPhysicianFacility.Text;

            oPhysicianFacilityClass.ID = ID;
            oPhysicianFacilityDAL.DeleteData(UserName, oPhysicianFacilityClass);

            PopulatePhysicianFacility(Convert.ToInt16(PhysicianID.Value));
        }
Esempio n. 5
0
        public void InsertData(string currUser, PhysicianFacilityModel oClass)
        {
            strSql = strSql + "INSERT INTO " + TABLE_PHYSICIAN_FACILITY + " (" +
                     COLUMN_PHYSICIAN_ID + ", " +
                     COLUMN_HOSPITAL_ID + ", " +
                     "created_by, created_date, updated_by, updated_date) ";
            strSql = strSql + "values ('" +
                     oClass.PhysicianID + "', '" +
                     oClass.HospitalID + "', '" +
                     currUser + "', " +
                     "CurDate(), '" +
                     currUser + "', " +
                     "CurDate() " +
                     ") ";

            SaveData(strSql);
        }