Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ClCatalog cl2 = new ClCatalog();
                cl2.CatalogTypeID = Convert.ToInt32("101");

                DataSet ds1 = CatalogClass.GetList(cl2);
                ddDefauleYear.DataSource     = ds1;
                ddDefauleYear.DataTextField  = "CatalogName";
                ddDefauleYear.DataValueField = "CatalogValue";

                ddDefauleYear.DataBind();

                ds1.Dispose();


                ddDefauleYear.Text = "1396";
                BindGrid();
            }
            else
            {
                ddDefauleYear.Text = ddDefauleYear.SelectedValue;
            }
        }
Exemplo n.º 2
0
        private void BindYear()
        {
            ClCatalog cl = new ClCatalog();

            cl.CatalogTypeID = Convert.ToInt32("10");

            DataSet ds = CatalogClass.GetList(cl);

            ddYear.DataSource     = ds;
            ddYear.DataTextField  = "CatalogName";
            ddYear.DataValueField = "CatalogValue";
            ddYear.DataBind();
            ds.Dispose();


            ClCatalog cl2 = new ClCatalog();

            cl2.CatalogTypeID = Convert.ToInt32("101");

            DataSet ds1 = CatalogClass.GetList(cl2);

            ddDefauleYear.DataSource     = ds1;
            ddDefauleYear.DataTextField  = "CatalogName";
            ddDefauleYear.DataValueField = "CatalogValue";

            ddDefauleYear.DataBind();

            ds1.Dispose();
        }
Exemplo n.º 3
0
 public void BindDD() {
     ClCatalog cl=new ClCatalog();
     cl.parentID=Convert.ToInt32(lblOwnerType.Text);
     DDDiscountType.DataSource = CatalogClass.GetList(cl);
     DDDiscountType.DataTextField = "CatalogName";
     DDDiscountType.DataValueField = "caid";
     DDDiscountType.DataBind();
 }
Exemplo n.º 4
0
        private void BindYear()
        {
            ClCatalog cl = new ClCatalog();

            cl.CatalogTypeID = Convert.ToInt32("10");

            DataSet ds = CatalogClass.GetList(cl);

            rpYear.DataSource = ds;
            rpYear.DataBind();
            ds.Dispose();
        }
Exemplo n.º 5
0
        private void BindSelectedItem()
        {
            ClCatalog cl = new ClCatalog();

            cl.CatalogTypeID = Convert.ToInt32("7");
            cl.Select        = 1;
            DataSet ds = CatalogClass.GetList(cl);

            rpSelectAllow.DataSource = ds;
            rpSelectAllow.DataBind();
            ds.Dispose();
        }
Exemplo n.º 6
0
        private void BindYear()
        {
            ClCatalog cl = new ClCatalog();

            cl.CatalogTypeID = 101;
            cl.parentID      = 1;

            DataSet ds = CatalogClass.GetList(cl);

            if (ds.Tables[0].Rows.Count > 0)
            {
                ddDefauleYear.SelectedValue = ds.Tables[0].Rows[0]["CAID"].ToString();
            }
        }
Exemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ClCatalog cl2 = new ClCatalog();
                cl2.CatalogTypeID = Convert.ToInt32("101");

                DataSet ds1 = CatalogClass.GetList(cl2);

                ddDefauleYear.DataSource     = ds1;
                ddDefauleYear.DataTextField  = "CatalogName";
                ddDefauleYear.DataValueField = "CatalogValue";

                ddDefauleYear.DataBind();

                ds1.Dispose();
                ddDefauleYear.Items.Add("همه موارد");
                ddDefauleYear.Items[2].Value = "0";

                if (Request.QueryString["yearID"] != null)
                {
                    ddDefauleYear.SelectedValue = Request.QueryString["yearID"].ToString();
                    ddDefauleYear.Text          = Request.QueryString["yearID"].ToString();;
                }



                ClPersonal cl = new ClPersonal();
                cl.PersonalID = Convert.ToInt32(Session["PersonalID"].ToString());

                DataSet ds = PersonalClass.GetList(cl);
                DataRow dr = ds.Tables[0].Rows[0];
                if (dr["Manage"].ToString() != "1")
                {
                    Response.Redirect("PersonalView.aspx?msg=شما دسترسی به این صفحه ندارید");
                    return;
                }

                txtFromDate.Text = DateConvert.m2sh(DateTime.Now.AddDays(-10).ToString());
                txtToDate.Text   = DateConvert.m2sh(DateTime.Now.ToString());
                BindddNazar();

                if (Request.QueryString["sid"] != null)
                {
                    ddRequestStatus.SelectedValue = Request.QueryString["sid"].ToString();
                }

                if (Request.QueryString["pid"] != null)
                {
                    SetNameAndFamil(Convert.ToInt32(Request.QueryString["pid"]));
                }

                if (Request.QueryString["companyID"] != null)
                {
                    ddcompany.SelectedValue = Request.QueryString["companyID"].ToString();
                }


                BindGrid();
                if (GridView1.Items.Count == 0)
                {
                    TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "درخواستی وجود ندارد");
                }
            }

            else
            {
                ddDefauleYear.Text = ddDefauleYear.SelectedValue;
            }
        }