Exemple #1
0
 private void LoadProductMaster()
 {
     Business.Inventory.ProductMaster objProductMaster = new Business.Inventory.ProductMaster();
     Entity.Inventory.ProductMaster   productMaster    = new Entity.Inventory.ProductMaster();
     productMaster.CompanyMasterId = 1;
     gvProductMaster.DataSource    = objProductMaster.GetAll(productMaster);
     gvProductMaster.DataBind();
 }
 //protected void LoadCustomer()
 //{
 //    Business.Customer.Customer objCustomer = new Business.Customer.Customer();
 //    Entity.Customer.Customer customer = new Entity.Customer.Customer();
 //    if (HttpContext.Current.User.IsInRole(Entity.HR.Utility.CUSTOMER_LIST_SHOW_ALL))
 //        customer.AssignEngineer = 0;
 //    else
 //        customer.AssignEngineer = int.Parse(HttpContext.Current.User.Identity.Name);
 //    DataTable dt = objCustomer.Customer_Customer_GetByAssignEngineerId(customer);
 //    ddlCustomer.DataSource = dt;
 //    ddlCustomer.DataTextField = "CustomerName";
 //    ddlCustomer.DataValueField = "CustomerMasterId";
 //    ddlCustomer.DataBind();
 //    ddlCustomer.InsertSelect();
 //}
 private void LoadProduct()
 {
     Business.Inventory.ProductMaster objProductMaster = new Business.Inventory.ProductMaster();
     Entity.Inventory.ProductMaster   productmaster    = new Entity.Inventory.ProductMaster();
     productmaster.CompanyMasterId = 1;
     ddlProduct.DataSource         = objProductMaster.GetAll(productmaster);
     ddlProduct.DataTextField      = "ProductName";
     ddlProduct.DataValueField     = "ProductMasterId";
     ddlProduct.DataBind();
     ddlProduct.InsertSelect();
 }
        private void LoadProduct()
        {
            Business.Inventory.ProductMaster objProductMaster = new Business.Inventory.ProductMaster();
            Entity.Inventory.ProductMaster   productmaster    = new Entity.Inventory.ProductMaster();

            productmaster.CompanyMasterId = 1;
            productmaster.Nature          = 1;
            productmaster.BrandId         = (ddlBrand.SelectedIndex == 0) ? 0 : int.Parse(ddlBrand.SelectedValue);
            DataTable dt = objProductMaster.GetAll(productmaster);

            ddlProduct.DataSource     = dt;
            ddlProduct.DataTextField  = "ProductName";
            ddlProduct.DataValueField = "ProductMasterId";
            ddlProduct.DataBind();
            ddlProduct.InsertSelect();
        }
Exemple #4
0
        private void LoadProduct()
        {
            Business.Inventory.ProductMaster objProductMaster = new Business.Inventory.ProductMaster();
            Entity.Inventory.ProductMaster   productmaster    = new Entity.Inventory.ProductMaster();

            productmaster.CompanyMasterId = 1;
            DataTable dt = objProductMaster.GetAll(productmaster);

            ddlDocketProduct.DataSource     = dt;
            ddlDocketProduct.DataTextField  = "ProductName";
            ddlDocketProduct.DataValueField = "ProductMasterId";
            ddlDocketProduct.DataBind();
            ListItem li = new ListItem("--SELECT ALL--", "0");

            ddlDocketProduct.Items.Insert(0, li);
        }
Exemple #5
0
        private void LoadAllItem()
        {
            using (DataTable dtItem = new DataTable())
            {
                dtItem.Columns.Add("ItemIdType");
                dtItem.Columns.Add("ItemName");

                Business.Inventory.ProductMaster objProductMaster = new Business.Inventory.ProductMaster();

                foreach (DataRow drItem in objProductMaster.GetAll(new Entity.Inventory.ProductMaster()
                {
                    CompanyMasterId = 1
                }).Rows)
                {
                    DataRow drNewItem = dtItem.NewRow();
                    drNewItem["ItemIdType"] = drItem["ProductMasterId"].ToString() + "|" + (int)ItemType.Product;
                    drNewItem["ItemName"]   = drItem["ProductName"].ToString() + " (P)";
                    dtItem.Rows.Add(drNewItem);
                    dtItem.AcceptChanges();
                }

                Business.Inventory.SpareMaster objSpareMaster = new Business.Inventory.SpareMaster();

                foreach (DataRow drItem in objSpareMaster.GetAll(new Entity.Inventory.SpareMaster()
                {
                }).Rows)
                {
                    DataRow drNewItem = dtItem.NewRow();
                    drNewItem["ItemIdType"] = drItem["SpareId"].ToString() + "|" + (int)ItemType.Spare;
                    drNewItem["ItemName"]   = drItem["SpareName"].ToString() + " (S)";
                    dtItem.Rows.Add(drNewItem);
                    dtItem.AcceptChanges();
                }

                ddlItem.DataSource     = dtItem;
                ddlItem.DataValueField = "ItemIdType";
                ddlItem.DataTextField  = "ItemName";
                ddlItem.DataBind();
                ddlItem.InsertSelect();
            }
        }