public string ItemTypeSql(CompanySetup objCompanySetup, BranchSetup objBranchSetup)
        {
            string sqlString = null;

            sqlString = "SELECT ItemTypeID,ItemType FROM matItemTypeSetup WHERE DataUsed = 'A' AND CompanyID = '" + objCompanySetup.CompanyID + "' AND BranchID = '" + objBranchSetup.BranchID + "' ORDER BY ItemType";
            return(sqlString);
        }
Пример #2
0
        public string SQLGetAllSuppliers(CompanySetup objCompanySetup, BranchSetup objBranchSetup)
        {
            string sqlString = null;

            sqlString = "SELECT ContactID,FullName FROM [AllSuppliers] WHERE CompanyID = " + objCompanySetup.CompanyID + " AND BranchID = " + objBranchSetup.BranchID + " ORDER BY FullName";
            return(sqlString);
        }
        public string UnitSql(CompanySetup objCompanySetup, BranchSetup objBranchSetup)
        {
            string sqlString = null;

            sqlString = "SELECT UnitID,Unit FROM matUnitSetup WHERE DataUsed = 'A' AND CompanyID = '" + objCompanySetup.CompanyID + "' AND BranchID = '" + objBranchSetup.BranchID + "' ORDER BY Unit";
            return(sqlString);
        }
 internal void LoadDepartmentDDL(DropDownList ddlDepartment, BranchSetup objBranchSetup)
 {
     try
     {
         _objOrganizationalChartSetupController = new OrganizationalChartSetupController();
         _objOrganizationalChartSetupController.LoadDepartmentDDL(ddlDepartment, objBranchSetup);
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 internal void LoadDepartmentDDL(DropDownList givenDDLID, BranchSetup objBranchSetup)
 {
     try
     {
         _objTwoColumnsTableData.TableName = "[orgDepartment]";
         SectionSetup objSectionSetup = new SectionSetup();
         objSectionSetup.CompanyID = objBranchSetup.CompanyID;
         objSectionSetup.BranchID  = objBranchSetup.BranchID;
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, this.SqlOrgDepartment(objSectionSetup), givenDDLID, "EntityName", "EntityID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 private void UCLoadDepartment(DropDownList ddlElementData)
 {
     try
     {
         _objBranchSetup = new BranchSetup();
         DropDownList ddlElementDataCompany = (DropDownList)GridViewOrganizationalChart.Rows[0].FindControl("ddlElementData");
         DropDownList ddlElementDataBranch  = (DropDownList)GridViewOrganizationalChart.Rows[1].FindControl("ddlElementData");
         _objBranchSetup.CompanyID   = Convert.ToInt32(ddlElementDataCompany.SelectedValue);
         _objBranchSetup.BranchID    = Convert.ToInt32(ddlElementDataBranch.SelectedValue);
         _objEmployeeSetupController = new EmployeeSetupController();
         _objEmployeeSetupController.LoadDepartmentDDL(ddlElementData, _objBranchSetup);
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
        private void LoadDropDownListData(DropDownList targetDDLItemTypeID, DropDownList targetDDLUnit, DropDownList targetDDBreakupUnit, DropDownList targetDDItemUsageID,
                                          DropDownList targetDDRelatedSupplier, DropDownList targetDDSalesAccountNo, DropDownList targetDDStockAccountNo, DropDownList targetDDCOGSAccountNo,
                                          DropDownList targetDDSalesReturnAccount)
        {
            try
            {
                ItemTypeSetupController objItemTypeSetupController = new ItemTypeSetupController();
                _objCompanySetup           = new CompanySetup();
                _objCompanySetup.CompanyID = Convert.ToInt32(Session["company"].ToString());
                _objBranchSetup            = new BranchSetup();
                _objBranchSetup.BranchID   = Convert.ToInt32(Session["branch"].ToString());
                ClsDropDownListController.LoadDropDownList(_connectionString, objItemTypeSetupController.ItemTypeSql(_objCompanySetup, _objBranchSetup), targetDDLItemTypeID, "ItemType", "ItemTypeID");
                UnitSetupController objUnitSetupController = new UnitSetupController();
                ClsDropDownListController.LoadDropDownList(_connectionString, objUnitSetupController.UnitSql(_objCompanySetup, _objBranchSetup), targetDDLUnit, "Unit", "UnitID");
                ClsDropDownListController.LoadDropDownList(_connectionString, objUnitSetupController.UnitSql(_objCompanySetup, _objBranchSetup), targetDDBreakupUnit, "Unit", "UnitID");
                ItemUsageSetupController objItemUsageSetupController = new ItemUsageSetupController();
                ClsDropDownListController.LoadDropDownList(_connectionString, objItemUsageSetupController.ItemUsageSql(_objCompanySetup, _objBranchSetup), targetDDItemUsageID, "ItemUsage", "ItemUsageID");
                SuppliersController objSuppliersController = new SuppliersController();
                ClsDropDownListController.LoadDropDownList(_connectionString, objSuppliersController.SQLGetAllSuppliers(_objCompanySetup, _objBranchSetup), targetDDRelatedSupplier, "FullName", "ContactID");
                _objItemSetupController         = new ItemSetupController();
                _objItemCategorySetup           = new ItemCategorySetup();
                _objItemCategorySetup.CompanyID = _objCompanySetup.CompanyID;
                _objItemCategorySetup.BranchID  = _objBranchSetup.BranchID;

                _objItemCategorySetup.KnownValueID = Convert.ToInt32(EnumCollections.eTransactionType.eSalesTrans);
                ClsDropDownListController.LoadDropDownList(_connectionString, _objItemSetupController.SQLForAccountType(_objItemCategorySetup), targetDDSalesAccountNo, "AccountName", "AccountNo");
                _objItemCategorySetup.KnownValueID = Convert.ToInt32(EnumCollections.eTransactionType.eStock);
                ClsDropDownListController.LoadDropDownList(_connectionString, _objItemSetupController.SQLForAccountType(_objItemCategorySetup), targetDDStockAccountNo, "AccountName", "AccountNo");
                _objItemCategorySetup.KnownValueID = Convert.ToInt32(EnumCollections.eTransactionType.eCOGS);
                ClsDropDownListController.LoadDropDownList(_connectionString, _objItemSetupController.SQLForAccountType(_objItemCategorySetup), targetDDCOGSAccountNo, "AccountName", "AccountNo");
                _objItemCategorySetup.KnownValueID = Convert.ToInt32(EnumCollections.eTransactionType.eSalesReturn);
                ClsDropDownListController.LoadDropDownList(_connectionString, _objItemSetupController.SQLForAccountType(_objItemCategorySetup), targetDDSalesReturnAccount, "AccountName", "AccountNo");
            }
            catch (Exception msgException)
            {
                throw msgException;
            }
        }