Exemplo n.º 1
0
 /// <summary>
 /// 设置初始界面
 /// </summary>
 private void fill()
 {
     Song.Entities.LinksSort mm = id == 0 ? new Song.Entities.LinksSort() : Business.Do <ILinks>().SortSingle(id);
     if (mm == null)
     {
         return;
     }
     this.EntityBind(mm);
 }
Exemplo n.º 2
0
        /// <summary>
        /// 修改是否显示的状态
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void sbShow_Click(object sender, EventArgs e)
        {
            StateShow ub    = (StateShow)sender;
            int       index = ((GridViewRow)(ub.Parent.Parent)).RowIndex;
            int       id    = int.Parse(this.GridView1.DataKeys[index].Value.ToString());

            //
            Song.Entities.LinksSort entity = Business.Do <ILinks>().SortSingle(id);
            entity.Ls_IsShow = !entity.Ls_IsShow;
            Business.Do <ILinks>().SortSave(entity);
            BindData(null, null);
        }
Exemplo n.º 3
0
 public Links[] GetLinks(int orgid, string sortName, bool?isShow, bool?isUse, int count)
 {
     if (string.IsNullOrWhiteSpace(sortName) || sortName.Trim() == "")
     {
         return(null);
     }
     Song.Entities.LinksSort sort = Gateway.Default.From <LinksSort>().Where(LinksSort._.Org_ID == orgid && LinksSort._.Ls_Name == sortName.Trim()).ToFirst <LinksSort>();
     if (sort == null)
     {
         return(null);
     }
     if (isShow != null && (bool)isShow && !sort.Ls_IsShow && !sort.Ls_IsUse)
     {
         return(null);
     }
     return(GetLinks(orgid, sort.Ls_Id, isShow, isUse, count));
 }
Exemplo n.º 4
0
 /// <summary>
 /// 修改
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnEnter_Click(object sender, EventArgs e)
 {
     Song.Entities.LinksSort mm = id == 0 ? new Song.Entities.LinksSort() : Business.Do <ILinks>().SortSingle(id);
     mm = this.EntityFill(mm) as Song.Entities.LinksSort;
     try
     {
         //确定操作
         if (id == 0)
         {
             Business.Do <ILinks>().SortAdd(mm);
         }
         else
         {
             Business.Do <ILinks>().SortSave(mm);
         }
         Master.AlertCloseAndRefresh("操作成功!");
     }
     catch (Exception ex)
     {
         Master.Alert(ex.Message);
     }
 }