Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         sql = "select p.*,'0' webservice from rps_bank p where serviceTypeid = '1'";
         try
         {
             DataSet Cacheds = new DataSet();
             Cacheds = obj_database.Local_GetDataSet1(sql);
             if (Cacheds.Tables[0].Rows.Count > 0)
             {
                 //Session["Webservice"] = Cacheds.Tables[0].Rows[0]["webservice"];
                 grvBank.DataSource = Cacheds.Tables[0];
                 grvBank.DataBind();
             }
             else
             {
                 int TotalColumns = grvBank.Rows[0].Cells.Count;
                 grvBank.Rows[0].Cells.Clear();
                 grvBank.Rows[0].Cells.Add(new TableCell());
                 grvBank.Rows[0].Cells[0].ColumnSpan = TotalColumns;
                 grvBank.Rows[0].Cells[0].Font.Bold  = true;
                 grvBank.Rows[0].Cells[0].Text       = "No Record Found";
             }
         }
         catch (Exception ex)
         {
         }
     }
     CustomerCode = Request.QueryString["Custombercode"];
     CustomerName = Request.QueryString["CustomerName"];
 }
    public void Get_BusinessNature()
    {
        DataSet   ds  = new DataSet();
        DataSet   dsu = new DataSet();
        DataTable dt  = new DataTable();

        string Query = "select distinct(company_Type) as Business_Nature, " +
                       " decode(company_Type,'R','RDA','A','Agent','C','Corporate','B','Bank') as Business_Desc  " +
                       " From company_setup where company_type is not null  ";

        DatabaseConnection_Util db = new DatabaseConnection_Util();

        ds  = db.Local_GetDataSet1(Query);
        dsu = lov.SP_GET_USERIFNO(Session["U_NAME"].ToString());
        if (dsu.Tables[0].Rows.Count > 0)
        {
            ddl_BusinessNature.DataSource     = ds.Tables[0];
            ddl_BusinessNature.DataValueField = "Business_Nature";
            ddl_BusinessNature.DataTextField  = "Business_Desc";
            ddl_BusinessNature.DataBind();
            //if (usertype.ToString() != "COMPANY")
            //{
            ddl_BusinessNature.Items.Insert(0, new ListItem("All", "All"));
            //}
        }
    }