Esempio n. 1
0
 //设置控件中的文本信息
 private void SetControlsText(cPos.Admin.Model.Right.MenuInfo mi)
 {
     if (mi != null)
     {
         tbDisplayIndex.Text             = mi.DisplayIndex.ToString();
         tbCode.Text                     = mi.Code;
         tbName.Text                     = mi.Name;
         tbEnglishName.Text              = mi.EnglishName;
         tbURL.Text                      = mi.URLPath;
         tbStatus.Text                   = mi.StatusDescription;
         cbCustomerVisible.SelectedValue = mi.CustomerVisible.ToString();
         tbCreater.Text                  = mi.Creater.Name;
         tbCreateTime.Text               = mi.CreateTime.ToString("yyyy-MM-dd HH:mm:ss.fff");
         tbEditor.Text                   = mi.LastEditor.Name;
         tbEditTime.Text                 = mi.LastEditTime.ToString("yyyy-MM-dd HH:mm:ss.fff");
         txtRemark.Value                 = mi.Remark;
         if (mi.LastSystemModifyStamp > DateTime.Parse("2000-1-1"))
         {
             tbSysModifyTime.Text = mi.LastSystemModifyStamp.ToString("yyyy-MM-dd HH:mm:ss.fff");
         }
         else
         {
             tbSysModifyTime.Text = string.Empty;
         }
     }
 }
Esempio n. 2
0
 //将录入项转换成对象
 private cPos.Admin.Model.Right.MenuInfo GetItemFormInput()
 {
     cPos.Admin.Model.Right.MenuInfo mi = new cPos.Admin.Model.Right.MenuInfo();
     mi.DisplayIndex      = int.Parse(tbDisplayIndex.Text);
     mi.Code              = tbCode.Text.Trim();
     mi.Name              = tbName.Text;
     mi.EnglishName       = tbEnglishName.Text;
     mi.URLPath           = tbURL.Text;
     mi.StatusDescription = tbStatus.Text;
     mi.CustomerVisible   = int.Parse(cbCustomerVisible.SelectedValue);
     mi.Creater.Name      = tbCreater.Text;
     //mi.CreateTime = DateTime.Parse (tbCreateTime.Text);
     mi.LastEditor.Name = tbEditor.Text;
     //mi.LastEditTime=DateTime.Parse ( tbEditTime.Text);
     //mi.LastSystemModifyStamp=DateTime.Parse (tbSysModifyTime.Text);
     return(mi);
 }
Esempio n. 3
0
 public RoleMenuInfo()
 {
     Role = new RoleInfo();
     Menu = new MenuInfo();
 }