Exemple #1
0
        public void FillYear(string CompCode)
        {
            try
            {
                DataTable GetYear = COMPANYLogicLayer.GetAllFinancialYearDetials(CompCode);
                string    Year    = GetCurrentFinancialYear();
                if (GetYear.Rows.Count > 0)
                {
                    DataView DV = new DataView(GetYear);
                    DV.RowFilter = "YRDT1='" + Year + "-04-01 00:00:00.000'";

                    DataTable DT = DV.ToTable();

                    if (DT.Rows.Count == 0)
                    {
                        string Ans = COMPANYLogicLayer.InsertFinancialYearDetials(CompCode, Year + "-04-01 00:00:00.000", (Convert.ToInt32(Year) + 1).ToString() + "-03-31 00:00:00.000");
                    }
                }
                DataTable Dt = COMPANYLogicLayer.GetFIN_YEARSDetailUserWiseRightsAndCompanyWise(ViewState["USERCODE"].ToString(), CompCode);
                DdlFinYear.DataSource     = Dt;
                DdlFinYear.DataValueField = "YRDT1";
                DdlFinYear.DataTextField  = "YearString";
                DdlFinYear.DataBind();
            }
            catch (Exception)
            {
                throw;
            }
        }
 public void FillYear(string CompCode)
 {
     try
     {
         DataTable Dt = COMPANYLogicLayer.GetFIN_YEARSDetailUserWiseRightsAndCompanyWise(Session["USERCODE"].ToString(), CompCode);
         DdlFinYear.DataSource     = Dt;
         DdlFinYear.DataValueField = "YRDT1";
         DdlFinYear.DataTextField  = "YearString";
         DdlFinYear.DataBind();
     }
     catch (Exception)
     {
         throw;
     }
 }