protected override void OnPreRender(EventArgs e)
 {
     if (!Ext.Net.X.IsAjaxRequest)
     {
         using (UserProvider provider = new UserProvider())
         {
             FavoriteRepeater.DataSource = provider.GetFavorites((this.Page as PageBase).User.ID);
             FavoriteRepeater.DataBind();
         }
         base.OnPreRender(e);
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Ext.Net.X.IsAjaxRequest)
            {
                using (UserProvider provider = new UserProvider())
                {
                    if (!provider.IsAdministrator((this.Page as PageBase).Roles))
                    {

                        menuAdministrator.Visible = false;
                    }

                    PreviouseRepeater.DataSource = provider.GetLastViewed((this.Page as PageBase).User.ID);
                    PreviouseRepeater.DataBind();

                    PreDefinedRepeater.DataSource = provider.GetPreDefined((this.Page as PageBase).User.ID);
                    PreDefinedRepeater.DataBind();
                }
            }
        }
Beispiel #3
0
        /// <summary>
        /// kmhCard -> tran
        /// </summary>
        protected static void FillKmh(Specification_1 kmhCard, transfer tran, DateTime currentDT)
        {
            //tran.prod_id = kmhCard._Product_ID.Value;

            if (kmhCard._Material_ID != null)
            {
                tran.material = kmhCard.Material.superpole;
                tran.material_id = kmhCard._Material_ID;
            }

            tran.sw = kmhCard.sw;
            tran.stw = kmhCard.stw;

            tran.ss = kmhCard.ss;
            tran.sp = kmhCard.sp;
            tran.sd = kmhCard.sd;

            tran.gotov_him = kmhCard.h_got.Trim() == "ГОТОВ" ? true : false;
            tran.gotov_tech = kmhCard.t_got.Trim() == "ГОТОВ" ? true : false;
            tran.gotov_svar = kmhCard.s_got.Trim() == "ГОТОВ" ? true : false;

            tran.gotov_kmh = kmhCard.gt_kmh == 1 ? true : false;

            tran.no = kmhCard.no;
            tran.cmt_ogt = kmhCard.cmt;
            tran.route = kmhCard.Route == null ? "" : kmhCard.Route.Trim();

            tran.pvd_id = kmhCard._dictPVDID;
            tran.pvd = tran.pvd_id == null ? "" : kmhCard._dictPVD.pvdn;
            tran.um_id = kmhCard._dictUMID;
            tran.um = tran.um_id == null ? "" : kmhCard._dictUM.umn1;
            tran.sf_id = kmhCard._dictSFID;
            tran.sf = tran.sf_id == null ? "" : kmhCard._dictSF.sfn;

            tran.ste_id = kmhCard._dictS_TEID;
            tran.ste = tran.ste_id == null ? "" : kmhCard._dictS_te.type;

            tran.actual = (kmhCard.StartDT < currentDT && kmhCard.FinishDT > currentDT);
            tran.isprikaz = !(kmhCard.OrderArticleID == null);

            try
            {
                using (UserProvider provider = new UserProvider())
                {
                    tran.last_change_date = kmhCard.dtle;
                    tran.last_change_user = (from u in provider.Users where u.ID == kmhCard.userID select u.Name).Single();
                }
            } catch {}
        }