protected void AddTab1() { Ext.Net.Panel panel1 = new Ext.Net.Panel { Title = "基本资料建档", Icon = Ext.Net.Icon.Add, Closable = false, Layout = "Fit", Loader = new ComponentLoader { Mode = LoadMode.Frame, Url = "TempPatient.aspx" } }; TabPanel1.Add(panel1); Ext.Net.Panel panel2 = new Ext.Net.Panel { Title = "临时排班", Icon = Ext.Net.Icon.Add, Closable = false, Layout = "Fit", Loader = new ComponentLoader { Mode = LoadMode.Frame, Url = "TempPatient_Sch1.aspx" } }; TabPanel1.Add(panel2); }
public void LoadForm(int id) { DataEntities ent = new DataEntities(); var n = (from l in ent.Product where l.ID == id select l).FirstOrDefault(); var files = from l in ent.File where l.ItemID == id select l; if (files.Count() > 0) { var file = files.First(); UpFile.Text = file.FileName; } Name.Text = n.Name; Specification.Text = n.Specification; Units.Text = n.Units; Price.Value = n.Price; ProduceLocation.Text = n.ProduceLocation; FaceImage.Text = n.FaceImage; Contact.Text = n.Contact; Tel.Text = n.Tel; Intro.Text = n.Intro; AddTime.Value = n.AddTime; Enable.Checked = n.Enable.ToBoolean(); SetTop.Checked = n.SetTop.ToBoolean(); ClickCount.Value = n.ClickCount; OrderIndex.Value = n.OrderIndex.ToInt32(); //FormPanel1.SetValues(n); ent.Dispose(); TabPanel1.SetActiveTab(1); FormPanel1.Title = "编辑"; }
protected void AddTabBase(string title) { Ext.Net.Panel panel = new Ext.Net.Panel { Title = title, Icon = Ext.Net.Icon.BookOpen, Closable = false, Layout = "Fit", TabConfig = new Ext.Net.Button() { UI = UI.Success }, Loader = new ComponentLoader { Mode = LoadMode.Frame, Url = "Dialysis_PreSetBase.aspx?personid=" + Patient_ID.Text + "&sdate=" + title } }; panel.Loader.LoadMask.ShowMask = true; panel.Loader.LoadMask.Msg = "读取中..."; if (CheckSchMod("base") == false) { panel.TabConfig.UI = Ext.Net.UI.Warning; } TabPanel1.Add(panel); panel.Render(); }
public void Modeset(int mode) { switch (mode) { case 1: { Tab1.BackColor = ActiveColor; Tab2.BackColor = inActiveColor; Tab3.BackColor = inActiveColor; TabPanel1.Show(); TabPanel2.Hide(); TabPanel3.Hide(); break; } case 2: { Tab1.BackColor = inActiveColor; Tab2.BackColor = ActiveColor; Tab3.BackColor = inActiveColor; TabPanel1.Hide(); TabPanel2.Show(); TabPanel3.Hide(); // 에어코리아 <> WHO기준 따라 표시할 컨트롤 바꿔뿌기 if (stdchk_airkorea.Checked) { alchk_1.Enabled = false; alchk_3.Enabled = false; alchk_7.Enabled = false; alchk_8.Enabled = false; } else { alchk_1.Enabled = true; alchk_3.Enabled = true; alchk_7.Enabled = true; alchk_8.Enabled = true; } break; } case 3: { Tab1.BackColor = inActiveColor; Tab2.BackColor = inActiveColor; Tab3.BackColor = ActiveColor; TabPanel1.Hide(); TabPanel2.Hide(); TabPanel3.Show(); break; } } }
public void AfterEdit(JObject obj) { DataEntities ent = new DataEntities(); var n = obj.ToObject <Voodoo.Basement.Message>(); //n.Content = n.Content.AsciiToNative().HtmlDeCode(); if (n.ID <= 0) { ent.AddToMessage(n); } else { var n_obj = (from l in ent.Message where l.ID == n.ID select l).First(); PropertyInfo[] ps = n.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (PropertyInfo p in ps) { object value = p.GetValue(n, null); if (value == null) { continue; } try { p.SetValue(n_obj, value, null); } catch { } } } ent.SaveChanges(); StringBuilder sb = new StringBuilder(); this.GridPanel1.Store.Primary.CommitChanges(); this.BindData(); TabPanel1.SetActiveTab(0); FormPanel1.Title = "新增"; FormPanel1.Reset(); X.Msg.Notify("消息", "保存成功!").Show(); }
public void LoadForm(int id) { DataEntities ent = new DataEntities(); var n = (from l in ent.Message where l.ID == id select l).FirstOrDefault(); //FormPanel1.SetValues(n); ID.Text = n.ID.ToS(); MessageTime.Value = n.MessageTime; UserName.Text = n.UserName; Email.Text = n.Email; Tel.Text = n.Tel; Title.Text = n.Title; Chat.Text = n.Chat; Content.Text = n.Content; ent.Dispose(); TabPanel1.SetActiveTab(1); FormPanel1.Title = "编辑"; }
protected void Page_Load(object sender, EventArgs e) { if (!X.IsAjaxRequest) { patient_id.Text = Request.QueryString["personid"]; patient_name.Text = Request.QueryString["patient_name"]; machine_type.Text = Request.QueryString["machine_type"]; machine_model.Text = Request.QueryString["mechine_model"]; bedno.Text = Request.QueryString["bedno"]; floor.Text = Request.QueryString["floor"]; area.Text = Request.QueryString["area"]; time.Text = Request.QueryString["time"]; daytyp.Text = Request.QueryString["daytyp"]; hpack.Text = Request.QueryString["hpack"]; hpack3.Text = Request.QueryString["hpack3"]; patient_weight.Text = Request.QueryString["patient_weight"]; AddTab(TabPanel1, "信息"); AddTab(TabPanel1, "医嘱"); AddTab(TabPanel1, "纪录"); TabPanel1.SetPreviousTabAsActive(); } }
protected void AddTab(string title) { Ext.Net.Panel panel = new Ext.Net.Panel { Title = title.Substring(0, 13), Icon = Ext.Net.Icon.CalendarSelectDay, Closable = false, Layout = "Fit", TabConfig = new Ext.Net.Button() { UI = UI.Success }, Loader = new ComponentLoader { Mode = LoadMode.Frame, Url = "Dialysis_PreSetSch.aspx?personid=" + Patient_ID.Text + "&sdate=" + title.Substring(0, 10) } }; panel.Loader.LoadMask.ShowMask = true; panel.Loader.LoadMask.Msg = "读取中..."; if (title.Length > 13) { if (title.Substring(13, 1) == "-") { panel.Icon = Ext.Net.Icon.Stop; } } if (CheckSchMod(title.Substring(0, 10)) == false) { panel.TabConfig.UI = Ext.Net.UI.Warning; } TabPanel1.Add(panel); panel.Render(); }
protected void Cancel_Click(object sender, DirectEventArgs e) { SetDefault(); FormPanel1.Title = "新增"; TabPanel1.SetActiveTab(0); }
protected void Form_Save(object sender, DirectEventArgs e) { using (DataEntities ent = new DataEntities()) { var n = new Voodoo.Basement.Product(); try { int id = ID.Text.ToInt32(); n = (from l in ent.Product where l.ID == id select l).First(); } catch { } n.AddTime = AddTime.Value.ToDateTime(); n.ClassID = ClassID.SelectedItem.Value.ToInt32(); n.ClassName = ClassID.SelectedItem.Text; n.ClickCount = ClickCount.Value.ToInt32(); n.Contact = Contact.Text; n.Enable = Enable.Checked; //n.FaceImage = ""; n.Intro = Intro.Text; n.Name = Name.Text; n.OrderIndex = OrderIndex.Value.ToInt32(); n.Price = Price.Value.ToDecimal(); n.ProduceLocation = ProduceLocation.Text; n.SetTop = SetTop.Checked; n.Specification = Specification.Text; n.Tel = Tel.Text; n.Units = Units.Text; if (n.ID <= 0) { ent.AddToProduct(n); } ent.SaveChanges(); if (FaceImage.HasFile) { Class cls = (from l in ent.Class where l.ID == n.ClassID select l).First(); string fileName = string.Format("/u/products/{0}.jpg", n.ID); Voodoo.Basement.BasePage.UpLoadImage(FaceImage.PostedFile, fileName, cls.ImageWidth.ToInt32(), cls.ImageHeight.ToInt32());//194, 204 n.FaceImage = fileName; ent.SaveChanges(); } if (UpFile.HasFile) { var files = from l in ent.File where l.ItemID == n.ID select l; foreach (var f in files) { ent.DeleteObject(f); } string ext = UpFile.FileName.GetFileExtNameFromPath(); string fileName = string.Format("/u/products/{0}", UpFile.FileName); Voodoo.Basement.BasePage.UpLoadFile(UpFile.PostedFile, fileName); Voodoo.Basement.File file = new Voodoo.Basement.File(); file.ClassID = n.ClassID; file.FileDirectory = "/u/products/"; file.FileExtName = ext; file.FileName = UpFile.FileName; file.FilePath = fileName; file.FileSize = UpFile.PostedFile.ContentLength; file.FileType = 0; file.ItemID = n.ID; file.SmallPath = ""; file.UpTime = DateTime.Now; ent.AddToFile(file); ent.SaveChanges(); } this.GridPanel1.Store.Primary.CommitChanges(); this.BindData(); TabPanel1.SetActiveTab(0); FormPanel1.Title = "新增"; FormPanel1.Reset(); X.Msg.Notify("消息", "保存成功!").Show(); } }
protected void Cancel_Click(object sender, DirectEventArgs e) { FormPanel1.SetValues(new Voodoo.Basement.Message()); FormPanel1.Title = "新增"; TabPanel1.SetActiveTab(0); }
protected void GetTabPanel() { AddTab1(); TabPanel1.SetPreviousTabAsActive(); }
protected void GetTabPanel() { int a = 0; int i, j, daytype, dweek; string tname = "处方底板"; AddTabBase(tname); string toDay = DateTime.Now.ToString("yyyy-MM-dd"); string sSQL; string[] DateArray = new string[14]; string[] DateArray_Sort = new string[14]; //雙周排班 sSQL = "SELECT a.appointment_date FROM appointment a "; sSQL += "LEFT JOIN pat_info b ON a.pif_id=b.pif_id "; sSQL += "WHERE b.pif_ic='" + Patient_ID.Text + "' AND a.appointment_date>='" + toDay + "' "; sSQL += "ORDER BY a.appointment_date"; DataTable dt = db.Query(sSQL); if (dt.Rows.Count > 0) { for (a = 0; a < dt.Rows.Count; a++) { tname = dt.Rows[a]["appointment_date"].ToString(); DateArray[a] = tname + ChinaWeek((int)Convert.ToDateTime(tname).DayOfWeek) + "-"; } } //預約排班 sSQL = "SELECT a.apptst_patic, a.apptst_daytyp FROM appointment_setup a "; sSQL += "LEFT JOIN pat_info b ON a.apptst_patic=b.pif_ic "; sSQL += "WHERE b.pif_ic='" + Patient_ID.Text + "' "; sSQL += "ORDER BY a.apptst_daytyp"; dt = db.Query(sSQL); if (dt.Rows.Count > 0) { for (j = 0; j < 7; j++) { tname = DateTime.Now.AddDays(j + 1).ToString("yyyy-MM-dd"); dweek = (int)Convert.ToDateTime(tname).DayOfWeek; for (i = 0; i < dt.Rows.Count; i++) { daytype = int.Parse(dt.Rows[i]["apptst_daytyp"].ToString()); if (daytype == dweek) { DateArray[a] = tname + ChinaWeek(dweek); a++; break; } } } } Array.Sort <string>(DateArray); string str1 = ""; string str2 = ""; for (a = 0; a < DateArray.Length; a++) { if (DateArray[a] != null) { str1 = DateArray[a]; if (str1.Substring(0, 13) != str2) { AddTab(DateArray[a]); str2 = str1.Substring(0, 13); } } } TabPanel1.SetPreviousTabAsActive(); }