private void DoSelect() { ////获取系统枚举流程 //string WFSQL = "select Code,TemplateName from FL_Culture_AimPortal..WorkflowTemplate"; //this.PageState.Add("WFEnum", DataHelper.QueryDict(WFSQL)); //this.PageState.Add("PostionType", SysEnumeration.GetEnumDict("PostionType")); string SQL = @" select top 20 MName,MName As Name from FL_Culture..ManagementGroup order by SortIndex Desc "; this.PageState.Add("PostionType", DataHelper.QueryDict(SQL)); string AccessPower = "", SurveyedPower = ""; if (!String.IsNullOrEmpty(id)) { ent = Model.SurveyType.Find(id); SurveyedPower = ent.SurveyedPower; AccessPower = ent.AccessPower; this.PageState.Add("AccessList", ent.AccessPower); } else { //创建情况 ent = new Model.SurveyType(); ent.TypeCode = "HR_ST" + DateTime.Now.ToString("yyyyMMddhhmm"); } this.SetFormData(ent); }
protected void Page_Load(object sender, EventArgs e) { op = RequestData.Get <string>("op"); id = RequestData.Get <string>("id"); type = RequestData.Get <string>("type"); switch (this.RequestAction) { case RequestActionEnum.Update: DoUpdate(); break; case RequestActionEnum.Insert: case RequestActionEnum.Create: DoCreate(); break; case RequestActionEnum.Delete: ent = GetTargetData <Model.SurveyType>(); ent.DoDelete(); return; default: DoSelect(); break; } }
private void DoStopType() { if (!string.IsNullOrEmpty(id)) { Model.SurveyType ent = Model.SurveyType.Find(id); ent.EnabledState = "0"; ent.DoUpdate(); this.PageState.Add("State", "Secuss"); } }
private void DoUpdate() { string AccessPower = RequestData.Get("AccessPower") + ""; string MustCheckFlow = RequestData.Get("MustCheckFlow") + ""; ent = this.GetMergedData <Model.SurveyType>(); ent.AccessPower = AccessPower; ent.MustCheckFlow = MustCheckFlow; ent.DoUpdate(); }
private void DoCreate() { string AccessPower = RequestData.Get("AccessPower") + ""; string MustCheckFlow = RequestData.Get("MustCheckFlow") + ""; ent = GetPostedData <Model.SurveyType>(); ent.AccessPower = AccessPower; ent.EnabledState = "1"; //启用标志 ent.MustCheckFlow = MustCheckFlow; ent.DoCreate(); }
string id = string.Empty; //数据ID protected void Page_Load(object sender, EventArgs e) { id = RequestData.Get("id") + ""; Model.SurveyType ent = null; switch (this.RequestAction) { case RequestActionEnum.Delete: ent = this.GetTargetData <Model.SurveyType>(); ent.DoDelete(); this.SetMessage("删除成功!"); break; default: if (RequestActionString == "batchdelete") { DoBatchDelete(); } else if (RequestActionString == "StartType") { DoStartType(); } else if (RequestActionString == "StopType") { DoStopType(); } else if (RequestActionString == "IsRef") { CheckRef(); } else { DoSelect(); } break; } }