Пример #1
0
        public int ChangeState(Attachment attach, int state)
        {
            using (var context = new WSI.DataAccess.WSICmsContext())
            {
                context.Attachments.Attach(attach);
                attach.State = state;

                context.LogChangesDuringSave = true;
                return context.SaveChanges();
            }
        }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (attid != "")
     {
         attach = service.GetDetail(attid);
     }
     if (!IsPostBack)
     {
         txtDesc.Text = attach.Description;
         txtSortIndex.Text = attach.SortIndex.ToString();
     }
 }