Пример #1
0
        protected void btn_Result_Click(object sender, EventArgs e)
        {
            Purchase purchase = new Purchase();

            if (user_manage == 0)
            {
                purchase.Staffinfo_Id = staffinfo_id;
            }
            purchase.Purchase_Id = 0;
            purchase.Year_Month  = 0;

            if (this.txt_Position.Text != "")
            {
                purchase.Purchase_Id = Convert.ToInt32(this.txt_Position.Text);
            }
            if (this.txt_Yearmonth.Text != "")
            {
                purchase.Year_Month = Convert.ToInt32(this.txt_Yearmonth.Text);
            }
            if (this.txt_Name.Text != "")
            {
                StaffProvider provider1 = new StaffProvider();
                purchase.Staffinfo_Id = provider1.GetStaffinfoId(this.txt_Name.Text.ToString());
            }

            PurchaseProvider provider = new PurchaseProvider();

            this.ListPager1.RecordCount = provider.GetSize();
            this.BindSource(purchase, 0);
            this.ListPager1.PageChange += new PagerEventHandler(ListPager1_PageChange);
        }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         PurchaseProvider provider = new PurchaseProvider();
         this.ListPager1.RecordCount = provider.GetSize();
         this.BindSource(0, "", 0);
     }
     this.account.Text           = Session["LOGINED"].ToString();
     this.datetime.Text          = this.BindDayWeek();
     this.ListPager1.PageChange += new PagerEventHandler(ListPager1_PageChange);
 }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (user_id == 0)
            {
                user_id = Convert.ToInt32(Session["USERID"].ToString());
            }

            if (user_manage == 0)
            {
                user_manage = Convert.ToInt32(Session["USERMANAGE"].ToString());
            }

            if (staffinfo_id == 0)
            {
                StaffProvider provider = new StaffProvider();

                staffinfo_id = provider.GetStaffinfoId(user_id);
            }

            if (!IsPostBack)
            {
                PurchaseProvider provider = new PurchaseProvider();

                Purchase purchase = new Purchase();

                this.GridView1.DataKeyNames = new string[] { "purchase_id", "staffinfo_id", "supplier_id" };

                if (user_manage == 0)
                {
                    purchase.Staffinfo_Id = staffinfo_id;
                    this.txt_Name.Enabled = false;
                }

                this.ListPager1.RecordCount = provider.GetSize();
                this.BindSource(purchase, 0);
            }

            this.account.Text           = GetAccout();// Session["LOGINED"].ToString();
            this.datetime.Text          = this.BindDayWeek();
            this.ListPager1.PageChange += new PagerEventHandler(ListPager1_PageChange);
        }
Пример #4
0
        protected void btn_Result_Click(object sender, EventArgs e)
        {
            Purchase purchase = new Purchase();

            purchase.Good_Id    = "";
            purchase.Year_Month = 0;
            if (this.txt_Name.Text != "")
            {
                purchase.Good_Id = this.txt_Name.Text.ToString();
            }
            if (this.txt_Yearmonth.Text != "")
            {
                purchase.Year_Month = Convert.ToInt32(this.txt_Yearmonth.Text);
            }

            PurchaseProvider provider = new PurchaseProvider();

            this.ListPager1.RecordCount = provider.GetSize(purchase);
            this.BindSource(0, purchase.Good_Id, purchase.Year_Month);
            this.ListPager1.PageChange += new PagerEventHandler(ListPager1_PageChange);
        }