예제 #1
0
        public void GetJODesigners()
        {
            GeneralLookup Designers = new GeneralLookup();
            Designers.LoadByCategoryID(Category.Designers);

            List<Models.Designer> AllDesigers = Designers.DefaultView.Table.AsEnumerable().Select(row =>
            {
                return new Models.Designer
                {
                    DesignerID = Convert.ToInt32(row[GeneralLookup.ColumnNames.GeneralLookupID].ToString()),
                    CategoryID = Convert.ToInt32(row[GeneralLookup.ColumnNames.CategoryID].ToString()),
                    DesignerName = row[GeneralLookup.ColumnNames.Name].ToString(),
                    Address = row[GeneralLookup.ColumnNames.Address].ToString(),
                    Email = row[GeneralLookup.ColumnNames.Email].ToString(),
                    Telephone = row[GeneralLookup.ColumnNames.Telephone].ToString(),

                };
            }).ToList();

            SetContentResult(AllDesigers);
            //return _response;
        }
예제 #2
0
        private void LoadData()
        {
            Clients clients = new Clients();
            clients.LoadAll();
            uiDropDownListClient.DataSource = clients.DefaultView;
            uiDropDownListClient.DataTextField = Clients.ColumnNames.ClientName;
            uiDropDownListClient.DataValueField = Clients.ColumnNames.ClientID;
            uiDropDownListClient.DataBind();

            JobOrderStatus statuses = new JobOrderStatus();
            statuses.LoadAll();
            uiDropDownListJOStatus.DataSource = statuses.DefaultView;
            uiDropDownListJOStatus.DataTextField = JobOrderStatus.ColumnNames.JobOrderStatusNameAr;
            uiDropDownListJOStatus.DataValueField = JobOrderStatus.ColumnNames.JobOrderStatusID;
            uiDropDownListJOStatus.DataBind();

            GeneralLookup digitalItem = new GeneralLookup ();
            digitalItem.LoadByCategoryID(Category.DigitalPrintingType);
            uiCheckBoxListDigitalItem.DataSource = digitalItem.DefaultView;
            uiCheckBoxListDigitalItem.DataTextField = GeneralLookup.ColumnNames.Name;
            uiCheckBoxListDigitalItem.DataValueField = GeneralLookup.ColumnNames.GeneralLookupID;
            uiCheckBoxListDigitalItem.DataBind();

            GeneralLookup serviceType = new GeneralLookup();
            serviceType.LoadByCategoryID(Category.DigitalPrintingServiceType);
            uiCheckBoxListServiceType.DataSource = serviceType.DefaultView;
            uiCheckBoxListServiceType.DataTextField = GeneralLookup.ColumnNames.Name;
            uiCheckBoxListServiceType.DataValueField = GeneralLookup.ColumnNames.GeneralLookupID;
            uiCheckBoxListServiceType.DataBind();

            GeneralLookup digitalPrintingSupplier = new GeneralLookup();
            digitalPrintingSupplier.LoadByCategoryID(Category.DigitalPrintingSupplier);
            uiDropDownListDigitalPrintingSupplier.DataSource = digitalPrintingSupplier.DefaultView;
            uiDropDownListDigitalPrintingSupplier.DataTextField = GeneralLookup.ColumnNames.Name;
            uiDropDownListDigitalPrintingSupplier.DataValueField = GeneralLookup.ColumnNames.GeneralLookupID;
            uiDropDownListDigitalPrintingSupplier.DataBind();

            GeneralLookup paperType = new GeneralLookup();
            paperType.LoadByCategoryID(Category.OffsetPrintingPaperType);
            uiRadioButtonListPaperType.DataSource = paperType.DefaultView;
            uiRadioButtonListPaperType.DataTextField = GeneralLookup.ColumnNames.Name;
            uiRadioButtonListPaperType.DataValueField = GeneralLookup.ColumnNames.GeneralLookupID;
            uiRadioButtonListPaperType.DataBind();

            GeneralLookup GSM = new GeneralLookup();
            GSM.LoadByCategoryID(Category.OffsetPrintingGSM);
            uiRadioButtonListGSM.DataSource = GSM.DefaultView;
            uiRadioButtonListGSM.DataTextField = GeneralLookup.ColumnNames.Name;
            uiRadioButtonListGSM.DataValueField = GeneralLookup.ColumnNames.GeneralLookupID;
            uiRadioButtonListGSM.DataBind();

            GeneralLookup offsetPrintHouse = new GeneralLookup();
            offsetPrintHouse.LoadByCategoryID(Category.OffsetPrintingPrintHouse);
            uiDropDownListOffsetPrintHouse.DataSource = offsetPrintHouse.DefaultView;
            uiDropDownListOffsetPrintHouse.DataTextField = GeneralLookup.ColumnNames.Name;
            uiDropDownListOffsetPrintHouse.DataValueField = GeneralLookup.ColumnNames.GeneralLookupID;
            uiDropDownListOffsetPrintHouse.DataBind();

            GeneralLookup finishBy = new GeneralLookup();
            finishBy.LoadByCategoryID(Category.OffsetPrintingFinishingSupplier);
            uiDropDownListOffsetPrintingFinishingBy.DataSource = finishBy.DefaultView;
            uiDropDownListOffsetPrintingFinishingBy.DataTextField = GeneralLookup.ColumnNames.Name;
            uiDropDownListOffsetPrintingFinishingBy.DataValueField = GeneralLookup.ColumnNames.GeneralLookupID;
            uiDropDownListOffsetPrintingFinishingBy.DataBind();

            GeneralLookup offsetFinishType = new GeneralLookup();
            offsetFinishType.LoadByCategoryID(Category.OffsetPrintingFinishType);
            uiCheckBoxListOffsetFinishType.DataSource = offsetFinishType.DefaultView;
            uiCheckBoxListOffsetFinishType.DataTextField = GeneralLookup.ColumnNames.Name;
            uiCheckBoxListOffsetFinishType.DataValueField = GeneralLookup.ColumnNames.GeneralLookupID;
            uiCheckBoxListOffsetFinishType.DataBind();
        }