public void FillDdlBranchOnCompCode()
        {
            try
            {
                DataTable Dt = new DataTable();

                Dt = BRANCH_MASLogicLayer.GetBranchNameCompanyWiseFor_DdlReport(compcode);
                DdlBranch.DataSource     = Dt;
                DdlBranch.DataValueField = "BRANCH_CODE";
                DdlBranch.DataTextField  = "BRANCH_NAME";
                DdlBranch.DataBind();

                DdlBranch.SelectedValue = Session["BRANCH_CODE"].ToString();
                DdlBranch.Enabled       = true;
            }
            catch (Exception)
            {
                throw;
            }
        }
        public string GetBranchList()
        {
            #region CSV_FOR BRANCH

            string CSV_BRANCHCODE = "";

            if (DdlBranch.SelectedIndex == 0)
            {
                DataTable DtAllBranch = new DataTable();

                DtAllBranch = BRANCH_MASLogicLayer.GetBranchNameCompanyWiseFor_DdlReport(compcode);

                for (int i = 0; i < DtAllBranch.Rows.Count; i++)
                {
                    string Ids = DtAllBranch.Rows[i]["BRANCH_CODE"].ToString();


                    if (Ids != string.Empty && Ids != null && Ids != "0")
                    {
                        if (CSV_BRANCHCODE != string.Empty)
                        {
                            CSV_BRANCHCODE = CSV_BRANCHCODE + "," + Ids;//,2,3,4
                        }
                        else
                        {
                            CSV_BRANCHCODE = CSV_BRANCHCODE + Ids;
                        }
                    }
                }
            }
            else
            {
                CSV_BRANCHCODE = DdlBranch.SelectedValue.ToString();//Single Value
            }

            #endregion

            return(CSV_BRANCHCODE);
        }