protected void ccmbSchool_BeforeDataBind(object sender, EventArgs e) { using (ReleaseClassBookApplClient client = new ReleaseClassBookApplClient()) { ccmbSchool.DataSource = client.GetSchoolByLoginName(_loginName); } }
protected void cbtnRelease_Click(object sender, EventArgs e) { //是否通过验证 if (IsValid) { using (var client = new ReleaseClassBookApplClient()) { //取选中的教材 cgrdInventory.PersistCheckState <InventoryForReleaseClassView>(); IEnumerable <InventoryForReleaseClassView> inventoryViews = cgrdInventory.GetGridCheckedDataList <InventoryForReleaseClassView>(); if (inventoryViews.Count() > 0) { //取发放信息 var releaseView = GetForm(); //发放教材 var result = client.SubmitReleaseClass(inventoryViews.ToArray(), releaseView); USCTAMis.Web.WebClient.ScriptManager.Alert(result.Message); cgrdInventory.DoDataBind(); } else { USCTAMis.Web.WebClient.ScriptManager.Alert("请选中待发放的教材"); } } } }
protected void ccmbStorage_BeforeDataBind(object sender, EventArgs e) { using (var client = new ReleaseClassBookApplClient()) { ccmbStorage.DataSource = client.GetStorages(_loginName); } }
protected void cbtnRelease_Click(object sender, EventArgs e) { //是否通过验证 if (IsValid) { using (var client = new ReleaseClassBookApplClient()) { //取选中的教材 cgrdInventory.PersistCheckState<InventoryForReleaseClassView>(); IEnumerable<InventoryForReleaseClassView> inventoryViews = cgrdInventory.GetGridCheckedDataList<InventoryForReleaseClassView>(); if (inventoryViews.Count() > 0) { //取发放信息 var releaseView = GetForm(); //发放教材 var result = client.SubmitReleaseClass(inventoryViews.ToArray(), releaseView); USCTAMis.Web.WebClient.ScriptManager.Alert(result.Message); cgrdInventory.DoDataBind(); } else { USCTAMis.Web.WebClient.ScriptManager.Alert("请选中待发放的教材"); } } } }
protected void ccmbGrade_BeforeDataBind(object sender, EventArgs e) { using (var client = new ReleaseClassBookApplClient()) { var schoolId = ccmbSchool.SelectedValue; ccmbGrade.DataSource = client.GetGradeBySchoolId(schoolId); } }
protected void ccmbProfessionalClass_BeforeDataBind(object sender, EventArgs e) { using (var client = new ReleaseClassBookApplClient()) { var schoolId = ccmbSchool.SelectedValue; var grade = ccmbGrade.SelectedValue; ccmbProfessionalClass.DataSource = client.GetClassBySchoolId(schoolId, grade); } }
protected void cgrdInventory_BeforeDataBind(object sender, EventArgs e) { using (var client = new ReleaseClassBookApplClient()) { var classId = ccmbProfessionalClass.SelectedValue; var storageId = ccmbStorage.SelectedValue; //避免有空值 if (string.IsNullOrWhiteSpace(classId) || string.IsNullOrWhiteSpace(storageId)) { return; } cgrdInventory.DataSource = client.GetInventoriesByClassId(classId, storageId); } }
private string GetStudentName(string studentNum) { if (string.IsNullOrWhiteSpace(studentNum)) { USCTAMis.Web.WebClient.ScriptManager.Alert("请输入学号"); return(string.Empty); } using (var client = new ReleaseClassBookApplClient()) { var result = client.GetStudentNameByStudentNum(studentNum); if (result.IsSuccess) { return(result.Message); } else { USCTAMis.Web.WebClient.ScriptManager.Alert(result.Message); return(string.Empty); } } }
private string GetStudentName(string studentNum) { if (string.IsNullOrWhiteSpace(studentNum)) { USCTAMis.Web.WebClient.ScriptManager.Alert("请输入学号"); return string.Empty; } using (var client = new ReleaseClassBookApplClient()) { var result = client.GetStudentNameByStudentNum(studentNum); if (result.IsSuccess) { return result.Message; } else { USCTAMis.Web.WebClient.ScriptManager.Alert(result.Message); return string.Empty; } } }