Ejemplo n.º 1
0
        public DirectResponse DoAddUser(string userName, string fullName, string company, string location, string batch, string role, string companies)
        {
            var dataUser = new data_UserCreateRequest();

            dataUser.Username  = userName;
            dataUser.FullName  = fullName;
            dataUser.Company   = company;
            dataUser.Location  = location;
            dataUser.Batch     = batch;
            dataUser.Role      = role;
            dataUser.Companies = companies;

            BSL_GLXAccountClient client = new BSL_GLXAccountClient();
            string mess = client.createUser(dataUser);

            DirectResponse dr = new DirectResponse();

            if (mess == "")
            {
                dr.Success = true;
                dr.Result  = String.Format("{{Message:'{0}'}}", "");
            }
            else
            {
                dr.Success      = false;
                dr.ErrorMessage = mess;
            }
            return(dr);
        }
Ejemplo n.º 2
0
        public void BindingDataWithFilter(string username)
        {
            Permissions.BSL_PermissionsClient client          = new Permissions.BSL_PermissionsClient();
            Permissions.data_Permissions[]    PermissionsList = client.GetPermissionByUser(username);
            strPermission.DataSource = PermissionsList;
            strPermission.DataBind();

            BSL_GLXAccountClient AccountClient = new BSL_GLXAccountClient();

            data_GLXAccount[] Companies = AccountClient.GetAll(username);
            strGLXAccount.DataSource = Companies;
            strGLXAccount.DataBind();

            BSL_RequisitionWkshNameClient WkshClient = new BSL_RequisitionWkshNameClient();

            data_RequisitionWkshName[] WkshList = WkshClient.GetDataByUser(username);
            strWorksheet.DataSource = WkshList;
            strWorksheet.DataBind();

            BSL_LocationAndAccountClient LocationClient = new BSL_LocationAndAccountClient();

            data_LocationAndAccount[] Locations = LocationClient.GetLocationByUser(username);
            strLocationAndAccount.DataSource = Locations;
            strLocationAndAccount.DataBind();
        }
Ejemplo n.º 3
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            if (!Ext.Net.X.IsAjaxRequest)
            {
                this.ResourceManager.AddDirectMethodControl(this);
            }

            #region Load Company Info
            Common common = new Common();
            Companies.Companies_Service svc = new GLXNAVWebApp.Companies.Companies_Service();
            svc.Credentials = common.CheckCredentials();
            Companies.Companies[] results = svc.ReadMultiple(null, "", 20);
            foreach (Companies.Companies item in results)
            {
                //if (item.Name == "GALAXY_MASTERDATA" || item.Name == "GALAXY_HCM" || item.Name == "GALAXY_BMT_COPY") continue;
                cbgCinema.Add(new Checkbox {
                    ID = item.Name, BoxLabel = item.Name
                });
                cboCompanyCard.Items.Add(new ListItem {
                    Text = item.Name, Value = item.Name
                });
            }
            #endregion Load Company Info

            #region Load Location and Batch
            List <LocationData> locations = GetLocation();
            List <BatchData>    batches   = GetBatch();

            foreach (LocationData item in locations)
            {
                cboLocation.Items.Add(new ListItem {
                    Text = item.Name, Value = item.Code
                });
            }

            foreach (BatchData item in batches)
            {
                cboBatch.Items.Add(new ListItem {
                    Text = item.Name, Value = item.Code
                });
            }
            #endregion Load Location and Batch

            #region Load User
            BSL_GLXAccountClient AccountClient = new BSL_GLXAccountClient();
            data_Account[]       AccountList   = AccountClient.GetAllAccount(GlobalVariable.UserName);
            strUsername.DataSource = AccountList;
            strUsername.DataBind();
            #endregion Load User
        }
Ejemplo n.º 4
0
        public DirectResponse DelUser(string uname)
        {
            BSL_GLXAccountClient client = new BSL_GLXAccountClient();
            string mess = client.DelUser(uname);

            DirectResponse dr = new DirectResponse();

            if (mess == "")
            {
                dr.Success = true;
                dr.Result  = String.Format("{{Message:'{0}'}}", "");
            }
            else
            {
                dr.Success      = false;
                dr.ErrorMessage = mess;
            }
            return(dr);
        }