public DataTable GetSchoolClassMasterDetails(BCSchoolAdmin objSchoolAdmin) { try { _dt = DataAccessLayer.ReturnDataTable("select SM.School,SM.SchoolId, CM.CityName,SCM.Class,SCM.ClassYear, SCM.ClassId from SchoolClassMaster SCM inner join SchoolMaster SM on SCM.SchoolId = SM.SchoolId left join CityMaster CM on SM.CityId=CM.CityId where sCm.IsActive = 1 and SM.CityId=(case '" + (objSchoolAdmin.CityName == 0 ? 0 : objSchoolAdmin.CityName) + "' when 0 then SM.CityId else '" + objSchoolAdmin.CityName + "' end) and SM.School like (CASE '" + (objSchoolAdmin.SchoolName == "" ? "0" : objSchoolAdmin.SchoolName) + "' WHEN ' ' THEN SM.School ELSE '" + objSchoolAdmin.SchoolName + "' END)+'%' order by School Asc "); } catch { } return(_dt); }
private int _SaveUpdate() { BCSchoolAdmin objSchoolAdmnin = new BCSchoolAdmin(); objUser.UserId = Convert.ToInt32(hdn_ClassAdminId.Value); objUser.FirstName = txt_FirstName.Text; objUser.LastName = txt_LastName.Text; objUser.Address = txtAddress.Text; objUser.Email = txtEmail.Text; objUser.Password = txtPassword.Text; return objSchoolAdmnin.InsertUpdateClassAdmin(objUser); //objUser.ClassId = Convert.ToInt16(ddl_Class.SelectedValue); //objAppAdmin.InsertUpdateCityAdmin(objUser); }
private int _SaveUpdate() { BCSchoolAdmin objSchoolAdmnin = new BCSchoolAdmin(); objUser.UserId = Convert.ToInt32(hdn_ClassAdminId.Value); objUser.FirstName = txt_FirstName.Text; objUser.LastName = txt_LastName.Text; objUser.Address = txtAddress.Text; objUser.Email = txtEmail.Text; objUser.Password = txtPassword.Text; return(objSchoolAdmnin.InsertUpdateClassAdmin(objUser)); //objUser.ClassId = Convert.ToInt16(ddl_Class.SelectedValue); //objAppAdmin.InsertUpdateCityAdmin(objUser); }
public DataTable GetClassAdminList(BCSchoolAdmin objSchoolAdmin) { try { _dt = DataAccessLayer.ExecuteStoredProcedureToRetDataTable(new SqlParameter[] { new SqlParameter("@ClassAdminId", (objSchoolAdmin.ClassAdminId == 0 ? 0 : objSchoolAdmin.ClassAdminId)), new SqlParameter("@AdminName", (objSchoolAdmin.AdminName == "" ? " " : objSchoolAdmin.AdminName)), new SqlParameter("@SchoolId", (objSchoolAdmin.SchoolId == 0 ? 0 : objSchoolAdmin.SchoolId)), new SqlParameter("@CityAdminId", (objSchoolAdmin.CityAdminId == 0 ? 0 : objSchoolAdmin.CityAdminId)), }, "SP_GETCLASSADMINS"); } catch (Exception ex) { throw ex; } return(_dt); }
public DataTable GetSchoolClassMasterDetails(BCSchoolAdmin objSchoolAdmin) { try { _dt = DataAccessLayer.ReturnDataTable("select SM.School,SM.SchoolId, CM.CityName,SCM.Class,SCM.ClassYear, SCM.ClassId from SchoolClassMaster SCM inner join SchoolMaster SM on SCM.SchoolId = SM.SchoolId left join CityMaster CM on SM.CityId=CM.CityId where sCm.IsActive = 1 and SM.CityId=(case '" + (objSchoolAdmin.CityName == 0 ? 0 : objSchoolAdmin.CityName) + "' when 0 then SM.CityId else '" + objSchoolAdmin.CityName + "' end) and SM.School like (CASE '" + (objSchoolAdmin.SchoolName == "" ? "0" : objSchoolAdmin.SchoolName) + "' WHEN ' ' THEN SM.School ELSE '" + objSchoolAdmin.SchoolName + "' END)+'%' order by School Asc "); } catch { } return _dt; }
public DataTable GetClassAdminList(BCSchoolAdmin objSchoolAdmin) { try { _dt = DataAccessLayer.ExecuteStoredProcedureToRetDataTable(new SqlParameter[] { new SqlParameter("@ClassAdminId", (objSchoolAdmin.ClassAdminId == 0 ? 0 : objSchoolAdmin.ClassAdminId)), new SqlParameter("@AdminName", (objSchoolAdmin.AdminName == "" ? " " : objSchoolAdmin.AdminName)), new SqlParameter("@SchoolId", (objSchoolAdmin.SchoolId == 0 ? 0 : objSchoolAdmin.SchoolId)), new SqlParameter("@CityAdminId", (objSchoolAdmin.CityAdminId == 0 ? 0 : objSchoolAdmin.CityAdminId)), }, "SP_GETCLASSADMINS"); } catch (Exception ex) { throw ex; } return _dt; }