Ejemplo n.º 1
0
        public SenVietVoucherObject(HttpRequestBase request)
        {
            this.InitObject();
            this._db         = new Models.WebAppAccEntities(Services.GlobalVariant.GetConnection());;
            this._request    = request;
            this._metaobject = Services.GlobalMeta.GetMetaObject(this._metaname);

            this._paramnamemasteroutput = this._keyfieldmaster;
            this._paramnamemasterupdate = string.Format("Original_{0}", this._keyfieldmaster);

            this._paramnamelineoutput = this._keyfieldline;
            this._paramnamelineupdate = string.Format("Original_{0}", this._keyfieldline);

            this._paramnamevatoutput = this._keyfieldvat;
            this._paramnamevatupdate = string.Format("Original_{0}", this._keyfieldvat);

            appajaxoption.ajaxoption.Add("ajaxupdateid", string.Format("{0}_container", this._metaname.ToLower()));
            appajaxoption.ajaxoption.Add("businesscode", this._businesscode);
            appajaxoption.ajaxoption.Add("metaname", this._metaname);
            appajaxoption.ajaxoption.Add("keyfield", this._keyfieldmaster);
            appajaxoption.ajaxoption.Add("action-return", this._request["action_return"]);

            this.sysbusiness = this._db.SysBusinesses.Where(m => m.BusinessCode == this._businesscode).SingleOrDefault();
            int roleid = Services.GlobalVariant.GetAppUser().RoleID;

            this.sysbusinessrole = this._db.SysBusinessRoles.Where(m => m.BusinessCode == this._businesscode & m.RoleID == roleid).SingleOrDefault();
        }
Ejemplo n.º 2
0
        public SenVietReportObject(HttpRequestBase request)
        {
            this.InitObject();

            this._db             = new Models.WebAppAccEntities(Services.GlobalVariant.GetConnection());
            this._request        = request;
            this._metaobject     = Services.GlobalMeta.GetMetaObject(this._metaname);
            this._currentsession = HttpContext.Current.Session;

            this._sessionkeys       = string.Format("{0}.Model", this._businesscode);
            this._sessionparamskeys = string.Format("{0}.Params", this._businesscode);

            appajaxoption.ajaxoption.Add("ajaxupdateid", string.Format("{0}_container", this._metaname.ToLower()));
            appajaxoption.ajaxoption.Add("businesscode", this._businesscode);
            appajaxoption.ajaxoption.Add("metaname", this._metaname);
            appajaxoption.ajaxoption.Add("keyfield", this._keyfield);
            appajaxoption.ajaxoption.Add("action-return", this._request["action_return"]);

            this.sysreports  = this._db.SysReports.Where(m => m.BusinessCode == this._businesscode).OrderBy(m => m.IsDefault).ToList();
            this.sysbusiness = this._db.SysBusinesses.Where(m => m.BusinessCode == this._businesscode).SingleOrDefault();

            int roleid = Services.GlobalVariant.GetAppUser().RoleID;

            this.sysbusinessrole = this._db.SysBusinessRoles.Where(m => m.BusinessCode == this._businesscode & m.RoleID == roleid).SingleOrDefault();
        }
Ejemplo n.º 3
0
        public SenVietGeneralObject(HttpRequestBase request, string businesscode)
        {
            this.InitObject();

            this._db           = new Models.WebAppAccEntities(Services.GlobalVariant.GetConnection());
            this._request      = request;
            this._businesscode = businesscode;

            appajaxoption.ajaxoption.Add("ajaxupdateid", string.Format("{0}_container", this._businesscode.ToLower()));
            appajaxoption.ajaxoption.Add("businesscode", this._businesscode);
            appajaxoption.ajaxoption.Add("metaname", this._businesscode);
            appajaxoption.ajaxoption.Add("keyfield", "");
            appajaxoption.ajaxoption.Add("action-return", this._request["action_return"]);

            this.sysbusiness = this._db.SysBusinesses.Where(m => m.BusinessCode == this._businesscode).SingleOrDefault();
            int roleid = Services.GlobalVariant.GetAppUser().RoleID;

            this.sysbusinessrole = this._db.SysBusinessRoles.Where(m => m.BusinessCode == this._businesscode & m.RoleID == roleid).SingleOrDefault();
        }