Exemplo n.º 1
0
        private void bindDropdownLists()
        {
            // pay plan
            ControlUtility.BindRadComboBoxControl(this.dropdownPayPlan, LookupWrapper.GetAllInUsePayPlans(false), null, "PayPlanTitle", "PayPlanID", "[-- Select Pay Plan --]");

            // regions
            ControlUtility.BindRadComboBoxControl(this.dropdownRegion, LookupWrapper.GetAllRegions(false), null, "RegionName", "RegionID", "[-- Select Region --]");

            // organization codes
            buildOrganizationCodeDropdown(base.CurrentUser.RegionID);

            // series -- initial setup
            // grades are built from within series
            buildSeriesDropdown(true);
        }
Exemplo n.º 2
0
        private void dropdownLowestAdvertisedGrade_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            try
            {
                int seriesID           = ControlUtility.GetDropdownValue(this.dropdownSeries);
                int lowGradeID         = ControlUtility.GetDropdownValue(this.dropdownLowestAdvertisedGrade);
                int organizationCodeID = this.checkboxStandardJNP.Checked ? 1 : ControlUtility.GetDropdownValue(this.dropdownOrganizationCode);

                buildSinglePositionDescriptionList(this.dropdownAdditionalPD, seriesID, lowGradeID, organizationCodeID, lowPDTopOptionEmpty, lowPDTopOptionFull, false);
            }
            catch (Exception ex)
            {
                base.HandleException(ex);
            }
        }
Exemplo n.º 3
0
        public ProductClothesForm()
        {
            InitializeComponent();

            openMode  = 0;
            productID = 0;

            this.pickValue_color.initValue(CharactorValueDao.getInstance().FindList(1), "Name", "Id");
            this.pickValue_size.initValue(CharactorValueDao.getInstance().FindList(2), "Name", "Id");

            this.pickValue_color.selectValueChanged += new PickValue.SelectValueChanged(pickValue_color_selectValueChanged);
            this.pickValue_size.selectValueChanged  += new PickValue.SelectValueChanged(pickValue_color_selectValueChanged);

            ControlUtility.initTree(this.comboBoxTree1.tvTreeView, CategoryTableName.ProductStainlessCategory);
        }
Exemplo n.º 4
0
        public override void initColumns(DataGridView dgv)
        {
            DataGridViewCheckBoxColumn check = new DataGridViewCheckBoxColumn();

            check.HeaderText = "选择";
            check.Name       = "check";
            check.Width      = 60;

            string[] columnTexts   = new string[] { "ID", "名称", "类别", "我方欠款/元\r(应付)", "对方欠款/元\r(应收)" };
            string[] columnNames   = new string[] { "ID", "name", "category", "myArrear", "hisArrear" };
            int[]    columnLengths = new int[] { 80, 120, 80, 120, 120 };

            ControlUtility.initColumns(dgv, columnNames, columnTexts, columnLengths);
            dgv.Columns.Insert(0, check);
        }
        protected override void initColumns()
        {
            DataGridViewCheckBoxColumn check = new DataGridViewCheckBoxColumn();

            check.HeaderText = "Ñ¡Ôñ";
            check.Name       = "check";
            check.Width      = 80;

            string[] columnTexts   = new string[] { "ID", "Ãû³Æ", "Àà±ð" };
            string[] columnNames   = new string[] { "ID", "name", "category" };
            int[]    columnLengths = new int[] { 120, 140, 120 };

            ControlUtility.initColumns(this.dataGridView1, columnNames, columnTexts, columnLengths, null);
            this.dataGridView1.Columns.Insert(0, check);
        }
Exemplo n.º 6
0
        private void LoadOrganizationCode()
        {
            OrganizationCodeCollection orgCodeColl = new OrganizationCodeCollection();

            orgCodeColl = CurrentUser.GetAssignedOrganizationCodes();
            //remove Org Code 0 from the list
            OrganizationCode spdOrgCode = new OrganizationCode();

            spdOrgCode.OrganizationCodeID = 1;
            orgCodeColl.Remove(spdOrgCode);

            rcbOrganizationCode.Items.Clear();

            int RegionID = -1;

            RegionID = Convert.ToInt32(rcbRegion.SelectedValue);
            enumOrgFormat format = enumOrgFormat.New;

            if (rdOrgCode.SelectedIndex > -1)
            {
                string strformat = rdOrgCode.SelectedValue;
                Enum.TryParse <enumOrgFormat>(strformat, true, out format);
            }

            if (RegionID > 0)
            {
                OrganizationCodeCollection filteredbyregion = orgCodeColl.GetByRegion(RegionID);
                if (format == enumOrgFormat.New)
                {
                    ControlUtility.BindRadComboBoxControl(rcbOrganizationCode, filteredbyregion, null, "NewOrgCodeLine", "OrganizationCodeID", "<<--Select Organization -->>");
                }
                else
                {
                    ControlUtility.BindRadComboBoxControl(rcbOrganizationCode, filteredbyregion, null, "OldOrgCodeLine", "OrganizationCodeID", "<<--Select Organization -->>");
                }
            }
            else
            {
                if (format == enumOrgFormat.New)
                {
                    ControlUtility.BindRadComboBoxControl(rcbOrganizationCode, orgCodeColl, null, "NewOrgCodeLine", "OrganizationCodeID", "<<--Select Organization -->>");
                }
                else
                {
                    ControlUtility.BindRadComboBoxControl(rcbOrganizationCode, orgCodeColl, null, "OldOrgCodeLine", "OrganizationCodeID", "<<--Select Organization -->>");
                }
            }
        }
Exemplo n.º 7
0
 void m_cmd_lap_phieu_Click(object sender, EventArgs e)
 {
     try
     {
         if (!ControlUtility.ValidateControlEmpty(m_txt_so_phieu, m_dat_ngay_chung_tu, m_sle_nhan_vien, m_sle_chuyen_toi_kho, m_sle_chuyen_tu_kho, m_txt_barcode))
         {
             XtraMessageBox.Show("Hoàn thiện dữ liệu trước", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             return;
         }
         lap_phieu();
     }
     catch (Exception v_e)
     {
         ExceptionHandle.Show(v_e);
     }
 }
        protected override void initColumns()
        {
            DataGridViewCheckBoxColumn check = new DataGridViewCheckBoxColumn();

            check.HeaderText = "选择";
            check.Name       = "check";
            check.Width      = 60;

            string[] columnTexts   = new string[] { "ID", "名称", "类别", "我方欠款/元\r(应付)", "对方欠款/元\r(应收)" };
            string[] columnNames   = new string[] { "ID", "name", "category", "myArrear", "hisArrear" };
            bool[]   columnNums    = new bool[] { false, false, false, true, true };
            int[]    columnLengths = new int[] { 80, 120, 80, 120, 120 };

            ControlUtility.initColumns(this.dataGridView1, columnNames, columnTexts, columnLengths, columnNums);
            this.dataGridView1.Columns.Insert(0, check);
        }
Exemplo n.º 9
0
        private void BindKSACombo()
        {
            var orderedList = KSAList.OrderBy(o => o.KSAText).ToList();

            this.radcomboKSA.DataSource = orderedList;
            this.radcomboKSA.DataBind();
            ControlUtility.BindRadComboBoxControl(radcomboKSA, orderedList, null, "KSAText", "KSAID", "<<--Select KSA First-->>");
            //Issue Id: 26
            //Author: Deepali Anuje
            //Date Fixed: 1/28/2012
            //Description:   Duty KSA Screen of JA
            if (KSAList.Count < 2 && KSAList[0].KSAText == UserControlBase.OTHERKSATEXT)
            {
                radcomboKSA.SelectedValue = "0";
            }
        }
Exemplo n.º 10
0
        public bool SearchForm()
        {
            string              sel        = "select * from " + TableInfo.FullName + " where 1=1 ";
            List <string>       conditions = new List <string>();
            List <SqlParameter> parameters = new List <SqlParameter>();

            ControlUtility.ProccessControls(Page,
                                            SetSearchCondition,
                                            new object[] { conditions, parameters });
            if (conditions.Count > 0)
            {
                sel += " and  " + string.Join(" and ", conditions.ToArray());
            }

            if (Condition != "")
            {
                sel += " and " + Condition;
            }
            var dr = SqlHelper.ExecuteReader(sel, parameters.ToArray());

            foreach (var c in conditions.ToArray())
            {
                foreach (var p in parameters.ToArray())
                {
                    if (c.Split('=')[1].ToLower() == p.ParameterName.ToLower())
                    {
                        UserCondition += " and " + c.Replace(c.Split('=')[1], p.SqlValue.ToString());
                    }
                }
            }

            if (Condition != "")
            {
                UserCondition += " and " + Condition;
            }

            if (!dr.Read())
            {
                dr.Close();
                return(false);
            }


            FillFromReader(dr);
            dr.Close();
            return(true);
        }
Exemplo n.º 11
0
        private void buttonSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (Page.IsValid)
                {
                    // save the JNP
                    JNPackage currentPackage = new JNPackage();
                    currentPackage.PayPlanID              = cpPayPlanID;
                    currentPackage.RegionID               = (hasManyRegions)? ControlUtility.GetDropdownValue(this.dropdownRegion): base.CurrentUser.RegionID;
                    currentPackage.SeriesID               = CpSeriesID;
                    currentPackage.OrganizationCodeID     = ControlUtility.GetDropdownValue(this.dropdownOrganizationCode);
                    currentPackage.IsStandardJNP          = false;
                    currentPackage.JNPTitle               = this.literalJNPTitle.Text;
                    currentPackage.IsInterdisciplinary    = this.checkboxIsInterdisciplinary.Checked;
                    currentPackage.AdditionalSeriesID     = ControlUtility.GetDropdownValue(this.dropdownAdditionalSeries);
                    currentPackage.JNPTypeID              = cpJNPType;
                    currentPackage.LowestAdvertisedGrade  = cpLowGrade;
                    currentPackage.HighestAdvertisedGrade = cpHighGrade;
                    currentPackage.FullPDID               = ControlUtility.GetDropdownValue(this.dropdownFullPD);
                    currentPackage.AdditionalPDID         = (cpJNPType == enumJNPType.TwoGrade)? ControlUtility.GetDropdownValue(this.dropdownAdditionalPD):-1;
                    currentPackage.DutyLocation           = this.textboxDutyLocation.Text;
                    currentPackage.IsDEU             = this.checkboxDEU.Checked;
                    currentPackage.IsMP              = this.checkboxMP.Checked;
                    currentPackage.IsExceptedService = this.checkboxException.Checked;
                    currentPackage.CreatedByID       = base.CurrentUserID;
                    currentPackage.JNPOptionTypeID   = eJNPOptionType.CreateFromExisting;
                    currentPackage.CopyFromJNPID     = CopyJNPID;
                    currentPackage.AddBasedOnExistingJNP();

                    if (currentPackage.JNPID > 0)
                    {
                        // set values
                        base.CurrentJNPID   = currentPackage.JNPID;
                        base.CurrentJAID    = currentPackage.JAID;
                        base.CurrentNavMode = enumNavigationMode.Edit;
                        //Bypassing information page
                        base.GoToLink("~/JA/JADuties.aspx", enumNavigationMode.Edit);
                    }
                }
            }
            catch (Exception ex)
            {
                base.HandleException(ex);
            }
        }
Exemplo n.º 12
0
        private void buildPositionDescriptionList()
        {
            int seriesID           = ControlUtility.GetDropdownValue(this.dropdownSeries);
            int highGradeID        = ControlUtility.GetDropdownValue(this.dropdownHighestAdvertisedGrade);
            int lowGradeID         = ControlUtility.GetDropdownValue(this.dropdownLowestAdvertisedGrade);
            int organizationCodeID = this.checkboxStandardJNP.Checked ? 1 : ControlUtility.GetDropdownValue(this.dropdownOrganizationCode);

            // to take care of Issues ID 53: Performance Issue -- populate pd dropdowns only when grade is selected
            if (highGradeID > 0)
            {
                buildSinglePositionDescriptionList(this.dropdownFullPD, seriesID, highGradeID, organizationCodeID, highPDTopOptionEmpty, highPDTopOptionFull, true);
                if (lowGradeID > 0)
                {
                    buildSinglePositionDescriptionList(this.dropdownAdditionalPD, seriesID, lowGradeID, organizationCodeID, lowPDTopOptionEmpty, lowPDTopOptionFull, false);
                }
            }
        }
Exemplo n.º 13
0
        private void buildPositionDescriptionList()
        {
            int organizationCodeID = ControlUtility.GetDropdownValue(this.dropdownOrganizationCode);

            // to take care of Issues ID 53: Performance Issue -- populate pd dropdowns only when grade is selected
            if (organizationCodeID > 0)
            {
                if (cpHighGrade > 0)
                {
                    buildSinglePositionDescriptionList(this.dropdownFullPD, CpSeriesID, cpHighGrade, organizationCodeID, highPDTopOptionEmpty, highPDTopOptionFull, true);
                    if ((cpJNPType == enumJNPType.TwoGrade) && (cpLowGrade > 0))
                    {
                        buildSinglePositionDescriptionList(this.dropdownAdditionalPD, CpSeriesID, cpLowGrade, organizationCodeID, lowPDTopOptionEmpty, lowPDTopOptionFull, false);
                    }
                }
            }
        }
Exemplo n.º 14
0
        private void bindParentPositions()
        {
            OrganizationChartPositionCollection positionList = OrganizationChartPositionManager.Instance.GetOrganizationChartPositions(base.CurrentOrgChartID);

            ControlUtility.BindRadComboBoxControl(this.dropDownParentPositions, positionList, null, "PositionLineItemFullName", "WFPPositionID", "<<-- Select Reports To Position -->>");

            if (positionList.Count > 0 && Request.QueryString[VIEWPOSIDKEY] != null)
            {
                int  tempID = -1;
                bool isOk   = int.TryParse(Request.QueryString[VIEWPOSIDKEY], out tempID);

                if (isOk)
                {
                    // load by parent if querystring exists
                    this.dropDownParentPositions.SelectedValue = Request.QueryString[VIEWPOSIDKEY];
                }
            }
        }
Exemplo n.º 15
0
        void CreateUserWizard_ContinueButtonClick(object sender, EventArgs e)
        {
            CheckBoxList  lst   = (CheckBoxList)ControlUtility.FindControl(this, "uxRoles");
            List <string> roles = new List <string>();

            foreach (ListItem r in lst.Items)
            {
                if (r.Selected)
                {
                    roles.Add(r.Value);
                }
            }
            if (roles.Count > 0)
            {
                Roles.AddUserToRoles(UserName, roles.ToArray());
            }
            this.ActiveStepIndex = 0;
        }
Exemplo n.º 16
0
        private void Form2_Load(object sender, EventArgs e)
        {
            string[] columnTexts   = new string[] { "排序时间", "时间", "业务单号", "业务类型", "明细(产品/单价/数量)", /*"本单应付/已付",*/ "本单应收", "本单已收", /*"累计欠款\r(应付)",*/ "累计欠款\r(应收)", "备注" };
            string[] columnNames   = new string[] { "sortTime", "time", "serial", "type", "detail", /*"needPay",*/ "needReceipt", "thisReceipt", /*"accNeedPay",*/ "accNeedReceipt", "comment" };
            int[]    columnLengths = new int[] { 0, 90, 140, 90, 260, 60, 60, 90, 120 };
            bool[]   columnNums    = new bool[] { false, false, false, false, false, true, true, true, false };

            ControlUtility.initColumns(this.dataGridView1, columnNames, columnTexts, columnLengths, null);

            //categoryDao.initTree与ControlUtility.initTree重复了,可以删掉一个
            CategoryDao.getInstance().initTreeView("CustomerCategory", this.treeView1);

            DateTime dateTime = DateTime.Now;

            this.dateTimePicker_start.Value = dateTime.AddMonths(-12);
            //this.backgroundWorker.RunWorkerAsync();
            //this.invokeBeginLoadNotify();
        }
Exemplo n.º 17
0
 private void dropdownRegion_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
 {
     try
     {
         int selectedRegionID = ControlUtility.GetDropdownValue(this.dropdownRegion);
         //OrganizationCode
         buildOrganizationCodeDropdown(selectedRegionID);
         // full/additional PD
         printTopOptionOnly(this.dropdownFullPD, highPDTopOptionEmpty);
         printTopOptionOnly(this.dropdownAdditionalPD, lowPDTopOptionEmpty);
         // clear JNP fields that are loaded from Full PD
         clearJNPDataFromFullPD();
     }
     catch (Exception ex)
     {
         base.HandleException(ex);
     }
 }
Exemplo n.º 18
0
        private void setRegionView()
        {
            // if user is: System Administrator, Classifier 15 or Staffing Manager -- show dropdown
            // otherwise: show region literal
            // first step -- set region ID
            ControlUtility.SafeListControlSelect(this.dropdownRegion, base.CurrentUser.RegionID);

            //JA issue id 120 - Staffing Manager is at Classifier 15 level - changed the Staffing Speicalist to Staffing Manager
            // Covers roles -- System Administrator, Classifier 15 and Staffing Manager
            bool isValidRegionEditRole = base.IsSystemAdministrator ||
                                         base.HasClassifier15Permission ||
                                         base.IsStaffingManager;

            //JA issue id 212 --Region is locked on Create Screen but should be editable if user has access to more than 1 region
            List <Region> regions = CurrentUser.GetListOfAssignedRegions();

            hasManyRegions = (regions.Count > 1);
            if ((regions.Count > 1) || (isValidRegionEditRole))
            {
                this.dropdownRegion.Visible = true;
                // toggle enable/disable of region autopostback -- we don't need to do a postback
                // if the user only has acces to his/her region
                this.dropdownRegion.AutoPostBack = true;
                this.literalRegion.Text          = string.Empty;
                //if user is not an admin/hr user and has access to different region orgcodes
                //then populate region dropdown with only regions that user has access to.
                if (!isValidRegionEditRole)
                {
                    this.dropdownRegion.ClearSelection();
                    ControlUtility.BindRadComboBoxControl(this.dropdownRegion, regions, null, "RegionName", "RegionID", "[-- Select Region --]", base.CurrentUser.RegionID.ToString());
                }
                else
                {
                    ControlUtility.BindRadComboBoxControl(this.dropdownRegion, regions, null, "RegionName", "RegionID", "[-- Select Region --]", base.CurrentUser.RegionID.ToString());
                }
            }
            else
            {
                this.dropdownRegion.Visible      = false;
                this.dropdownRegion.AutoPostBack = false;
                this.literalRegion.Text          = base.CurrentUser.RegionName;
            }
        }
Exemplo n.º 19
0
        private void toggleOrganizationCodeView(enumOrgChartType selectedChartType, OrgCodeFormatTypes listFormat)
        {
            // Get data based on chart type
            OrganizationCodeCollection listOrgCodes = base.CurrentUser.GetAvailableOrganizationCodesByChartType(selectedChartType, listFormat);

            if (listOrgCodes.Count == 0)
            {
                // display message if there is no organization codes
                printOrgCodeListMessage(GetLocalResourceObject("NoOrgCodesAvailableMessage").ToString());
            }
            else
            {
                printOrgCodeListMessage(string.Empty);
                string displayTextField = (listFormat == OrgCodeFormatTypes.NewOrgCode) ? "NewOrgCodeLine" : "OldOrgCodeLine";

                // show org codes if there is data
                ControlUtility.BindRadComboBoxControl(dropDownOrganizationCodes, listOrgCodes, null, displayTextField, "OrganizationCodeID", "<<--Select Organization -->>");
            }
        }
Exemplo n.º 20
0
        private void SaveForm()
        {
            dataRecord = new Record(TableName);
            Control start = GetStartControl();

            ControlUtility.ProccessControls(start, new ControlUtility.ControlProcessDelegate(SaveControl), null);
            if (FormState == FormState.Edit)
            {
                dataRecord.Keys[KeyFieldName] = CurrentKeyValue;
                dataRecord.Update();
                uxMessage.Text = "ويرايش با موفقيت انجام شد.";
            }
            else
            {
                dataRecord.Insert();
                RowsCount++;
                uxMessage.Text = "ذخيره با موفقيت انجام شد.";
            }
        }
Exemplo n.º 21
0
        private void bindParentPositions(int selectedRootNodeID)
        {
            bool isRoot = (selectedRootNodeID == base.CurrentOrgChart.StartPointWFPPositionID);

            IList <IWorkforcePlanningPosition> positionList = null;

            if (isRoot)
            {
                positionList = WorkforcePlanningPositionManager.Instance.GetRootNodeParentPositionsForChart(base.CurrentOrgChartID).ToList <IWorkforcePlanningPosition>();
            }
            else
            {
                // not a root node -- normal position listing
                positionList = OrganizationChartPositionManager.Instance.GetOrganizationChartPositionsExcludePath(base.CurrentOrgChartID, selectedRootNodeID).ToList <IWorkforcePlanningPosition>();
            }

            // load this position list, but exclude the entire path starting with the currently edited WFPPositionID and everything underneath (this is done to prevent circular references)
            ControlUtility.BindRadComboBoxControl(this.dropDownParentPositions, positionList, null, "PositionLineItemFullNameReverse", "WFPPositionID", "<<-- Select Reports To Position -->>");
        }
Exemplo n.º 22
0
        private void LoadOrganizationCode()
        {
            rcbOrganizationCode.Items.Clear();
            OrganizationCodeCollection orgCodeColl = CurrentUser.GetAssignedActiveOrganizationCodes();
            enumOrgFormat format = enumOrgFormat.New;

            if (rdOrgCode.SelectedIndex > -1)
            {
                string strformat = rdOrgCode.SelectedValue;
                Enum.TryParse <enumOrgFormat>(strformat, true, out format);
            }
            if (format == enumOrgFormat.New)
            {
                ControlUtility.BindRadComboBoxControl(rcbOrganizationCode, orgCodeColl, null, "NewOrgCodeLine", "OrganizationCodeID", "<<--Select Organization -->>");
            }
            else
            {
                ControlUtility.BindRadComboBoxControl(rcbOrganizationCode, orgCodeColl, null, "OldOrgCodeLine", "OrganizationCodeID", "<<--Select Organization -->>");
            }
        }
        private void toggleReplaceRoot(bool isChecked)
        {
            this.panelReplaceRoot.Visible = isChecked;

            this.buttonDeleteOrgChart.Enabled  = !isChecked;
            this.buttonSubmitToDraft.Enabled   = !isChecked;
            this.buttonSubmitToReview.Enabled  = !isChecked;
            this.buttonSubmitToApprove.Enabled = !isChecked;

            if (isChecked)
            {
                WorkforcePlanningPositionCollection listPositions = WorkforcePlanningPositionManager.Instance.GetPotentialRootReplacementPositions(base.CurrentOrgChartID);

                bool hasData = listPositions.Count > 0;
                this.buttonSaveNewRoot.Enabled = hasData;

                // bind root position dropdown
                ControlUtility.BindRadComboBoxControl(this.dropDownPositions, listPositions, null, "PositionLineItemFullNameReverse", "WFPPositionID", "<<-- Select New Top Level Position -->>");
            }
        }
Exemplo n.º 24
0
        public override void Build(XmlNode xmlNode, IBundle owner)
        {
            ToolStrip toolStrip = null;

            if (xmlNode.Name == "ToolStrip")
            {
                toolStrip = GetOrCreate(XmlUtility.ReadAttribute(xmlNode, "id"));
            }
            else if (xmlNode.Name == "ToolbarItem")
            {
                //insert to default ToolBar
                toolStrip = GetOrCreate(string.Empty);
                ToolStripItem item = ToolbarItemBuilder.Build(xmlNode, owner);
                ControlUtility.Invoke(toolStrip, () => toolStrip.Items.Add(item));
            }
            if (toolStrip != null)
            {
                List <ToolStripItem> items = ToolbarItemBuilder.Build(xmlNode.ChildNodes, owner);
                ControlUtility.Invoke(toolStrip, () => toolStrip.Items.AddRange(items.ToArray()));
            }
        }
Exemplo n.º 25
0
        private void EnsureDefaultStylesheets()
        {
            if (IncludeDefaultStylesheets && !defaultStylesheetsIncluded)
            {
                var path = (ControlUtility.IsLocalPath(StylesheetsXmlUri)
                                ? Context.Server.MapPath(StylesheetsXmlUri)
                                : ResolveUrl(StylesheetsXmlUri));

                var document = DownloadXml(Context, path);

                if (document != null)
                {
                    document = RemoveNamespace(document);

                    foreach (var element in document.XPathSelectElements("/includes/stylesheets/stylesheet"))
                    {
                        var template = element.Attribute("template");

                        if (template == null || string.IsNullOrEmpty(template.Value) ||
                            template.Value.Equals(Template.ToString(), StringComparison.InvariantCultureIgnoreCase))
                        {
                            var location = element.Attribute("location");

                            if (location != null)
                            {
                                var media    = element.Attribute("media");
                                var priority = element.Attribute("priority");

                                stylesheets.Add(new Stylesheet(
                                                    location.Value,
                                                    media == null ? "all" : media.Value,
                                                    priority == null ? 80 : Convert.ToDouble(priority.Value)));
                            }
                        }
                    }
                }

                defaultStylesheetsIncluded = true;
            }
        }
        //已经迁移
        public override void initColumns(DataGridView dgv)
        {
            DataGridViewCheckBoxColumn check = new DataGridViewCheckBoxColumn();

            check.HeaderText = "选择";
            check.Name       = "check";
            check.Width      = 60;

            DataGridViewTextBoxColumn ID = new DataGridViewTextBoxColumn();

            ID.HeaderText = "ID";
            ID.Name       = "ID";
            ID.Visible    = false;

            string[] columnTexts   = new string[] { "货号", "名称", "类别", "停用", "采购价\r/元", "销售价\r/元", "成本价\r/元", "库存数量" };
            string[] columnNames   = new string[] { "serial", "name", "category", "disable", "pricePurchase", "priceSell", "priceCost", "libNum" };
            int[]    columnLengths = new int[] { 70, 120, 65, 50, 80, 80, 80, 100 };

            ControlUtility.initColumns(dgv, columnNames, columnTexts, columnLengths);
            dgv.Columns.Insert(0, check);
            dgv.Columns.Insert(0, ID);
        }
Exemplo n.º 27
0
        private void buildOrganizationCodeDropdown(int regionID)
        {
            bool isNilRegionID = regionID == -1;
            //JA issue 897 not able to see recently assigned orgcode in JAX create new package
            //fixed by always reloading instead of getting from cache.
            OrganizationCodeCollection orgCodes = LookupWrapper.GetOrganizationCodesByUser(true, CurrentUserID).GetByRegion(regionID);
            //JA id :957:JAX: Remove Standard Org code 0 from HR's list in JAX
            //removing standard organization code from the dropdown list since we no longer support standard packages.
            OrganizationCode standardOrgCode = new OrganizationCode();

            standardOrgCode.OrganizationCodeID = 1;
            orgCodes.Remove(standardOrgCode);

            if (isNilRegionID)
            {
                printTopOptionOnly(this.dropdownOrganizationCode, "[-- Select Region First --]");
            }
            else
            {
                ControlUtility.BindRadComboBoxControl(this.dropdownOrganizationCode, orgCodes, null, "DetailLineLegacy", "OrganizationCodeID", "[-- Select Organization Code --]");
            }
        }
Exemplo n.º 28
0
        protected override void OnRenderContent()
        {
            base.OnRenderContent();

            if (active == true)
            {
                EditorGUILayout.BeginHorizontal();
                {
                    if (manager != null)
                    {
                        // Calcualte the average
                        float total = 0;

                        foreach (WorkerThread thread in manager)
                        {
                            total += thread.ThreadLoad;
                        }

                        // Avoid divide by 0
                        if (manager.ActiveThreads > 0)
                        {
                            total /= manager.ActiveThreads;
                        }


                        totalUsage.Value        = total;
                        totalUsage.Content.Text = string.Format("Total Usage: {0}%", (int)(total * 100));
                    }

                    ControlUtility.RenderControl(totalUsage);
                }
                EditorGUILayout.EndHorizontal();
            }
            else
            {
                GUILayout.Label("No data - Thread usage data will be displayed here when the game is running", EditorStyles.helpBox);
            }
        }
Exemplo n.º 29
0
        protected void dropdownImportance_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            try
            {
                RadComboBox      dropdownImportance = (RadComboBox)sender;
                GridEditableItem editedItem         = (GridEditableItem)dropdownImportance.NamingContainer;

                RadComboBox dropdownNeedAtEntry         = editedItem.FindControl("dropdownNeedAtEntry") as RadComboBox;
                RadComboBox dropdownDistinguishingValue = editedItem.FindControl("dropdownDistinguishingValue") as RadComboBox;

                long jQFactorID = (long)editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["JQFactorID"];
                JobAnalysisDutyKSAFactor currentKSAFactor = new JobAnalysisDutyKSAFactor(jQFactorID);


                if (currentKSAFactor != null)
                {
                    if (dropdownImportance.SelectedValue != "")
                    {
                        currentKSAFactor.ImportanceID = (enumImportanceScale)ControlUtility.GetDropdownValue(dropdownImportance);
                    }
                    if (dropdownNeedAtEntry.SelectedValue != "")
                    {
                        currentKSAFactor.NeedAtEntryID = (enumNeedAtEntryScale)ControlUtility.GetDropdownValue(dropdownNeedAtEntry);
                    }
                    if (dropdownDistinguishingValue.SelectedValue != "")
                    {
                        currentKSAFactor.DistinguishingValueScaleID = (enumDistinguishingValueScale)ControlUtility.GetDropdownValue(dropdownDistinguishingValue);
                    }
                    currentKSAFactor.UpdatedByID = base.CurrentUserID;
                    currentKSAFactor.UpdateScaleAndFinalInformation();
                    bindData();
                }
            }
            catch (Exception ex)
            {
                base.HandleException(ex);
            }
        }
Exemplo n.º 30
0
        private OrganizationChartPosition buildPosition()
        {
            OrganizationChartPosition position = new OrganizationChartPosition()
            {
                OrganizationChartID   = base.CurrentOrgChartID,
                WFPPositionID         = this.EditPositionID,
                eOrgPositionType      = (enumOrgPositionType)ControlUtility.GetDropdownValue(this.dropDownOrganizationPositionTypes),
                PositionGroupType     = (enumOrgPositionGroupType)ControlUtility.GetDropdownValue(this.dropDownPositionLocationGroupTypes),
                PositionPlacementType = (enumOrgPositionPlacementType)ControlUtility.GetDropdownValue(this.dropDownPositionPlacements),
                UpdatedByID           = CurrentUserID
            };

            if (this.TopLevelEditOK)
            {
                position.ReportsToID = ControlUtility.GetDropdownValue(this.dropDownParentPositions);
            }
            else
            {
                position.ReportsToID = this.OriginalReportsToID;
            }

            return(position);
        }