public static void Update() { SystemAreaCode.Update(); List <SystemOrgRegionVM> Regionlist = new List <SystemOrgRegionVM>(); DataTable dt = DB.GetDataTable("SELECT ID,[OrgID],[RegionID] FROM [dbo].[R_RegionAndOrg]", "ConnDB"); EntityS.FillModel(Regionlist, dt); SystemOrgRegion.dictOrgRegion = Regionlist.OrderBy(item => item.OrgID) .GroupBy(item => item.OrgID) .ToDictionary(IGrouping => IGrouping.Key, IGrouping => IGrouping.ToList()); dt.Dispose(); List <SystemOrgRegionCountyVM> Countylist = new List <SystemOrgRegionCountyVM>(); dt = DB.GetDataTable(" SELECT [id] ,[OrgID] ,[CountyID] FROM [dbo].[R_RegionCountyAndOrg] ", "ConnDB"); EntityS.FillModel(Countylist, dt); SystemOrgRegion.dictOrgCounty = Countylist.OrderBy(item => item.OrgID) .GroupBy(item => item.OrgID) .ToDictionary(IGrouping => IGrouping.Key, IGrouping => IGrouping.ToList()); dt.Dispose(); List <SystemRegionSettingVM> Settinglist = new List <SystemRegionSettingVM>(); dt = DB.GetDataTable(" SELECT [RegionID] , [CountyID] ,[TownID] ,[VillageID],SettingID FROM [dbo].[R_RegionSetting] ", "ConnDB"); EntityS.FillModel(Settinglist, dt); SystemOrgRegion.dictRegionSetting = Settinglist.OrderBy(item => item.RegionID) .GroupBy(item => item.RegionID) .ToDictionary(IGrouping => IGrouping.Key, IGrouping => IGrouping.ToList()); dt.Dispose(); }
protected void Page_Load(object sender, EventArgs e) { //long Process_MemoryStart = 0; //long Process_MemoryEnd = 0; //System.Diagnostics.Process MyProcess = System.Diagnostics.Process.GetCurrentProcess(); //Process_MemoryStart = MyProcess.PrivateMemorySize64; //Response.Write(Process_MemoryStart); //Console.WriteLine(Process_MemoryStart); //Console.WriteLine(GC.GetTotalMemory(true).ToString()); SystemCode.Update(); SystemRole.Update(); SystemRoleOrg.Update(); SystemAreaCode.Update(); //Process_MemoryEnd = MyProcess.PrivateMemorySize64; //Response.Write(Process_MemoryEnd); //Console.WriteLine(Process_MemoryEnd); //HomeUrlVM vm =new HomeUrlVM(); //vm.PageUrl = "/System/CodeM/CodeSetting.aspx"; //vm.date = DateTime.Now; //string s = JsonConvert.SerializeObject(vm); //s=QueryStringEncryptToolS.Encrypt(s); //s = HttpUtility.UrlEncode(s); //Response.Write(s); //Response.End(); //HomeUrlSecret secret = new HomeUrlSecret(); //secret.RedirectUrl = "Home"; //string s=JsonConvert.SerializeObject(secret); //UrlParameterEncryptT EncryptT = new UrlParameterEncryptT(); //UrlParameterDecryptT DecryptT = new UrlParameterDecryptT(); //s = EncryptT.GetOutSecretJsonWithEncrypt(secret); //string ss = s; //int cc = s.Length; //Response.Write(s); //Response.Write("<br/>"); //Response.Write(s.Length); //s = HttpUtility.UrlEncode(s); //Response.Write("<br/>"); //Response.Write(s); //Response.Write("<br/>"); //Response.Write(s.Length); //Response.Write("<br/>"); //string a = Request["o"]??""; //int b = 0; //int.TryParse(Request["c"] ?? "0", out b); //HomeUrlSecret secret2 = new HomeUrlSecret(); //secret2 = DecryptT.GetUrlSecret<HomeUrlSecret>(ss, TimeSpan.FromDays(1), cc); //if(secret2.IsValid==true) // Response.Write("2Checksum驗證成功"); //else // Response.Write("2Checksum驗證失敗"); //Response.End(); }
public CaseUserProfile(int CaseUserID) : base() { DataTable dt = (DataTable)DBUtil.DBOp("ConnDB", "dbo.usp_CaseUser_xGetCaseUserWithMother {0}", new string[] { CaseUserID.ToString() }, NSDBUtil.CmdOpType.ExecuteReaderReturnDataTable); SystemCode.Update(); SystemAreaCode.Update(); if (dt.Rows.Count > 0) { CaseID = CaseUserID; BirthDate = dt.Rows[0]["BirthDateSimple"].ToString(); IdNo = dt.Rows[0]["IdNo"].ToString(); PassportNo = dt.Rows[0]["PassportNo"].ToString(); ResNo = dt.Rows[0]["ResNo"].ToString(); OtherNo = dt.Rows[0]["OtherNo"].ToString(); Name = dt.Rows[0]["ChName"].ToString(); EngName = dt.Rows[0]["EnName"].ToString(); Gender = dt.Rows[0]["Gender"].ToString(); GenderName = SystemCode.GetName("CaseUser_Gender", Convert.ToInt32(Gender)); HouseNo = dt.Rows[0]["HouseNo"].ToString(); ONationality = dt.Rows[0]["ONationality"].ToString(); Language = dt.Rows[0]["Language"].ToString().Split(','); foreach (string s in Language) { if (s != "") { LanguageName += SystemCode.GetName("CaseUser_Language", Convert.ToInt32(s)) + ","; } } LanguageName = (LanguageName != null ? LanguageName.TrimEnd(',') :""); Capacity = dt.Rows[0]["Capacity"].ToString().Split(','); foreach (string s in Capacity) { if (s != "") { CapacityName += SystemCode.GetName("CaseUser_Capacity", Convert.ToInt32(s)) + ","; } } CapacityName = (CapacityName != null ? CapacityName.TrimEnd(',') : ""); ConCounty = dt.Rows[0]["ConCounty"].ToString(); if (ConCounty != "") { ConCountyName = SystemAreaCode.GetName(Convert.ToInt32(dt.Rows[0]["ConCounty"])); } ConTown = dt.Rows[0]["ConTown"].ToString(); if (ConTown != "") { ConTownName = SystemAreaCode.GetName(Convert.ToInt32(dt.Rows[0]["ConTown"])); } ConVillage = dt.Rows[0]["ConVillage"].ToString(); if (ConVillage != "") { ConVillageName = SystemAreaCode.GetName(Convert.ToInt32(dt.Rows[0]["ConVillage"])); } ConAddr = dt.Rows[0]["ConAddr"].ToString(); ResCounty = dt.Rows[0]["ResCounty"].ToString(); if (ResCounty != "") { ConCountyName = SystemAreaCode.GetName(Convert.ToInt32(dt.Rows[0]["ResCounty"])); } ResTown = dt.Rows[0]["ResTown"].ToString(); if (ResTown != "") { ResTownName = SystemAreaCode.GetName(Convert.ToInt32(dt.Rows[0]["ResTown"])); } ResVillage = dt.Rows[0]["ResVillage"].ToString(); if (ResVillage != "") { ResVillageName = SystemAreaCode.GetName(Convert.ToInt32(dt.Rows[0]["ResVillage"])); } ResAddr = dt.Rows[0]["ResAddr"].ToString(); MotherName = dt.Rows[0]["MotherName"].ToString(); MotherIdNo = dt.Rows[0]["MotherIdNo"].ToString(); MotherBirthDate = dt.Rows[0]["MotherBirthDateSimple"].ToString(); // PregWeek = dt.Rows[0]["PregWeek"].ToString(); // BirthNum = dt.Rows[0]["BirthNum"].ToString(); // BirthSeq = dt.Rows[0]["BirthSeq"].ToString(); //BirthWeight = dt.Rows[0]["BirthWeight"].ToString(); //BirthPlace = dt.Rows[0]["BirthPlace"].ToString(); // Deliver = dt.Rows[0]["Deliver"].ToString(); // DeliverOrg = dt.Rows[0]["DeliverOrg"].ToString(); // MarryStatus = dt.Rows[0]["MarryStatus"].ToString(); // EduLevel = dt.Rows[0]["EduLevel"].ToString(); // ElemSchool = dt.Rows[0]["ElemSchool"].ToString(); //Occupation = dt.Rows[0]["Occupation"].ToString(); // EduLevel = dt.Rows[0]["EduLevel"].ToString(); //EduLevel = dt.Rows[0]["EduLevel"].ToString(); // ResAddr = dt.Rows[0]["ResAddr"].ToString(); // BirthMulti = dt.Rows[0]["BirthMulti"].ToString(); } }