Exemple #1
0
        private void LoadRecordDynamicDDL(DropDownList givenDDLID, TwoColumnsTableData objTwoColumnsTableData)
        {
            try
            {
                string sqlString = @"SELECT [FieldOfID]
                 ,[FieldOfName]
                 FROM [TwoColumnsTable] 
                 WHERE DataUsed = 'A' AND [TableID] = " + objTwoColumnsTableData.TableID + "";

                if (objTwoColumnsTableData.CompanyID != 0)
                {
                    sqlString += " AND [CompanyID] = " + objTwoColumnsTableData.CompanyID + "";
                }

                if (objTwoColumnsTableData.BranchID != 0)
                {
                    sqlString += " AND[BranchID] = " + objTwoColumnsTableData.BranchID + "";
                }

                sqlString += " ORDER BY [FieldOfName]";
                ClsDropDownListController.LoadDropDownList(this.ConnectionString, sqlString, givenDDLID, "FieldOfName", "FieldOfID");
            }
            catch (Exception msgException)
            {
                throw msgException;
            }
        }
        internal void GetKnownValueSubledger(SubledgerSetup objSubledgerSetup, DropDownList ddlKnownValue)
        {
            try
            {
                string sqlString = @"SELECT [KnownValueID],[KnownValueName] FROM [AccCoaSubLedgerKnownValue] WHERE [DataUsed] = 'A'";

                if (objSubledgerSetup.CompanyID != 0)
                {
                    sqlString += " AND [CompanyID] = " + objSubledgerSetup.CompanyID + "";
                }

                if (objSubledgerSetup.BranchID != 0)
                {
                    sqlString += " AND[BranchID] = " + objSubledgerSetup.BranchID + "";
                }

                sqlString += " ORDER BY [KnownValueName]";

                ClsDropDownListController.LoadDropDownList(this.ConnectionString, sqlString, ddlKnownValue, "KnownValueName", "KnownValueID");
            }
            catch (Exception msgException)
            {
                throw msgException;
            }
        }
Exemple #3
0
 internal void LoadRelatedUserRoleDDL(DropDownList ddlRelatedUserRoleID, CompanySetup objCompanySetup)
 {
     try
     {
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, this.SqlForRelatedUserRole(objCompanySetup), ddlRelatedUserRoleID, "RelatedToText", "RelatedToID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 internal void LoadCompanyDDL(DataTable dtAssignCompany, DropDownList ddlCompany)
 {
     try
     {
         ClsDropDownListController.LoadDropDownListFromDataTable(dtAssignCompany, ddlCompany, "CompanyName", "CompanyID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 internal void LoadCompany(DropDownList ddlCompany)
 {
     try
     {
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, this.SqlGetCompany(), ddlCompany, "CompanyName", "CompanyID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 public void LoadPriority(DropDownList ddlPrioritySearch)
 {
     try
     {
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, this.SqlGetPriority(), ddlPrioritySearch, "PriorityName", "PriorityID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
Exemple #7
0
 internal void LoadEmployeeCategoryDDL(DropDownList ddlEmployeeCategory, TwoColumnsTableData objTwoColumnsTableData)
 {
     try
     {
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, SqlGetEmployeeCategory(objTwoColumnsTableData), ddlEmployeeCategory, "FieldOfName", "FieldOfID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
Exemple #8
0
 internal void LoadEmployeeTitle(DropDownList ddlTitle)
 {
     try
     {
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, SqlGetEmployeeTitle(), ddlTitle, "FieldOfName", "FieldOfID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
Exemple #9
0
 internal void LoadDesignationDDL(DropDownList givenDDL, TwoColumnsTableData objTwoColumnsTableData)
 {
     try
     {
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, SqlGetDesignation(objTwoColumnsTableData), givenDDL, "FieldOfName", "FieldOfID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 internal void LoadVehicleBodyTypeDDL(DropDownList givenDDLID, CompanySetup objCompanySetup)
 {
     try
     {
         _objTwoColumnsTableData.TableName = "VehicleBodyType";
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, this.SqlVehicleProperty(objCompanySetup), givenDDLID, "FieldOfName", "FieldOfID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
Exemple #11
0
 private void GetTwoColumnsTableDataAuto(DropDownList givenDDL, string sqlString)
 {
     try
     {
         string sqlStringFinal = "SELECT FieldOfID,FieldOfName FROM " + sqlString + " WHERE DataUsed = 'A' ORDER BY FieldOfName";
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, sqlStringFinal, givenDDL, "FieldOfName", "FieldOfID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 internal void GetCategory(string connectionString, DropDownList ddlCategory)
 {
     try
     {
         string sql = "SELECT DISTINCT CategoryName,ItemCategoryID FROM [matCategoryList] WHERE DataUsed = 'A' ORDER BY ItemCategoryID";
         ClsDropDownListController.LoadDropDownList(connectionString, sql, ddlCategory, "CategoryName", "ItemCategoryID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 internal void LoadTeamDDL(DropDownList givenDDLID, SectionSetup objSectionSetup)
 {
     try
     {
         _objTwoColumnsTableData.TableName = "[orgTeam]";
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, this.SqlOrgDepartment(objSectionSetup), givenDDLID, "EntityName", "EntityID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 internal void LoadOrganizationalElements(OrganizationalChartSetup objOrganizationalChartSetup, DropDownList dropDownListOrganizationElements)
 {
     try
     {
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, this.SqlGetOrganizationalElements(objOrganizationalChartSetup), dropDownListOrganizationElements,
                                                    "OrgElementName", "OrgElementID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 internal void GetSubLedgerTypeNonConvertable(DropDownList ddlSubLedgerTypeNonConvertable, SubledgerSetup objSubledgerSetup)
 {
     try
     {
         objSubledgerSetup.IsConvertable = "N";
         string sqlString = SqlGetSubLedgerType(objSubledgerSetup);
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, sqlString, ddlSubLedgerTypeNonConvertable, "SubLedgerTypeName", "SubledgerTypeID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 internal void LoadBranchDDL(DropDownList givenDDLID, CompanySetup objCompanySetup)
 {
     try
     {
         _objTwoColumnsTableData.TableName = "[orgBranch]";
         SectionSetup objSectionSetup = new SectionSetup();
         objSectionSetup.CompanyID = objCompanySetup.CompanyID;
         ClsDropDownListController.LoadDropDownList(this.ConnectionString, this.SqlOrgDepartment(objSectionSetup), givenDDLID, "EntityName", "EntityID");
     }
     catch (Exception msgException)
     {
         throw msgException;
     }
 }
 private void LoadParentAccountDdl()
 {
     try
     {
         const string sqlQuery = "SELECT [AccountNo],[AccountName]FROM [accCOAHeadSetup] ORDER BY [AccountNo]";
         ClsDropDownListController.LoadDropDownList(_connectionString, sqlQuery, ddlParentAccountNo, "AccountName", "AccountNo");
         if (treeCOAHead.Nodes.Count > 0)
         {
             ddlParentAccountNo.Items.RemoveAt(0);
         }
         else
         {
             ddlParentAccountNo.Items.RemoveAt(0);
             ddlParentAccountNo.Items.Insert(0, new ListItem("--- No Data Found ---", "-1"));
             ddlParentAccountNo.SelectedIndex = 0;
         }
     }
     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;
            }
        }