Ejemplo n.º 1
0
        void ucCusItem_Click(object sender, EventArgs e)
        {
            UCCustomerItem cus  = (UCCustomerItem)sender;
            CustomerModel  item = (CustomerModel)cus.Tag;

            foreach (Control ctr in flpListCus.Controls)
            {
                if (ctr.BackColor == Color.FromArgb(0, 153, 0))
                {
                    ctr.BackColor = Color.FromArgb(255, 255, 255);
                    ctr.ForeColor = Color.FromArgb(51, 51, 51);
                }
            }
            cus.BackColor = Color.FromArgb(0, 153, 0);
            cus.ForeColor = Color.FromArgb(255, 255, 255);
            if (item.Balance != 0)
            {
                this.txtBalan.Text = money.Format2(item.Balance);
            }
            else
            {
                this.txtBalan.Text = "0";
            }
            itemS = item;
        }
Ejemplo n.º 2
0
        private void txtSearchCus_TextChanged(object sender, EventArgs e)
        {
            flpListCus.Controls.Clear();
            var listCustomer = CustomerService.GetCustomerSearch(txtSearchCus.Text);
            int i            = 0;

            foreach (CustomerModel item in listCustomer)
            {
                UCCustomerItem ucCusItem = new UCCustomerItem();
                ucCusItem.lblCusID.Text    = item.ClientID.ToString();
                ucCusItem.lblCusName.Text  = item.Fname + " " + item.Lname;
                ucCusItem.lblCusPhone.Text = item.Phone;
                ucCusItem.lblBalance.Text  = money.Format2(item.Balance);
                ucCusItem.lblDetail.Text   = "View";
                ucCusItem.Click           += ucCusItem_Click;
                ucCusItem.Width            = flpListCus.Width;
                ucCusItem.Tag = item;
                if (i % 2 == 0)
                {
                    ucCusItem.BackColor = Color.FromArgb(255, 255, 255);
                }
                else
                {
                    ucCusItem.BackColor = Color.FromArgb(242, 242, 242);
                }
                flpListCus.Controls.Add(ucCusItem);
                i++;
            }
        }
Ejemplo n.º 3
0
 private void LoadCustomer()
 {
     try
     {
         flpCustomer.Controls.Clear();
         var listCustomer = CustomerService.GetCustomer();
         int i            = 0;
         foreach (CustomerModel item in listCustomer)
         {
             UCCustomerItem ucCusItem = new UCCustomerItem();
             ucCusItem.lblCusID.Text    = item.ClientID.ToString();
             ucCusItem.lblCusName.Text  = item.Fname + " " + item.Lname;
             ucCusItem.lblCusPhone.Text = item.Phone;
             ucCusItem.lblDetail.Text   = "View";
             ucCusItem.Click           += ucCusItem_Click;
             ucCusItem.Width            = flpCustomer.Width;
             ucCusItem.Tag = item;
             if (i % 2 == 0)
             {
                 ucCusItem.BackColor = Color.FromArgb(255, 255, 255);
             }
             else
             {
                 ucCusItem.BackColor = Color.FromArgb(242, 242, 242);
             }
             flpCustomer.Controls.Add(ucCusItem);
             i++;
         }
     }
     catch (Exception ex)
     {
         SystemLog.LogPOS.WriteLog("frmCustomer::::::::::::::::LoadCustomer:::::::::::::::::::::" + ex.Message);
     }
 }
Ejemplo n.º 4
0
        private void LoadCustomer()
        {
            flpListAcc.Controls.Clear();
            var listCustomer = CustomerService.GetCustomer();
            int i            = 0;

            foreach (CustomerModel item in listCustomer)
            {
                UCCustomerItem ucCusItem = new UCCustomerItem();
                ucCusItem.lblCusID.Text    = item.ClientID.ToString();
                ucCusItem.lblCusName.Text  = item.Fname + " " + item.Lname;
                ucCusItem.lblCusPhone.Text = item.Phone;
                ucCusItem.lblDetail.Text   = "View";
                ucCusItem.Click           += ucCusItem_Click;
                ucCusItem.Width            = flpListAcc.Width;
                ucCusItem.Tag = item;
                if (i % 2 == 0)
                {
                    ucCusItem.BackColor = Color.FromArgb(255, 255, 255);
                }
                else
                {
                    ucCusItem.BackColor = Color.FromArgb(242, 242, 242);
                }
                flpListAcc.Controls.Add(ucCusItem);
                i++;
            }
        }
Ejemplo n.º 5
0
 void ucCusItem_Click(object sender, EventArgs e)
 {
     UCCustomerItem ucCus = (UCCustomerItem)sender;
     itemS = (CustomerModel)ucCus.Tag;
     foreach (Control ctr in flpListAcc.Controls)
     {
         if (ctr.BackColor == Color.FromArgb(0, 153, 0))
         {
             ctr.BackColor = Color.FromArgb(255, 255, 255);
             ctr.ForeColor = Color.FromArgb(51, 51, 51);
         }
     }
     ucCus.BackColor = Color.FromArgb(0, 153, 0);
     ucCus.ForeColor = Color.FromArgb(255, 255, 255);
 }
Ejemplo n.º 6
0
 void ucCusItem_Click(object sender, EventArgs e)
 {
     try
     {
         UCCustomerItem ucCus = (UCCustomerItem)sender;
         itemS = (CustomerModel)ucCus.Tag;
         foreach (Control ctr in flpCustomer.Controls)
         {
             if (ctr.BackColor == Color.FromArgb(0, 153, 0))
             {
                 ctr.BackColor = Color.FromArgb(255, 255, 255);
                 ctr.ForeColor = Color.FromArgb(51, 51, 51);
             }
         }
         ucCus.BackColor = Color.FromArgb(0, 153, 0);
         ucCus.ForeColor = Color.FromArgb(255, 255, 255);
     }
     catch (Exception ex)
     {
         SystemLog.LogPOS.WriteLog("frmCustomer::::::::::::::ucCusItem_Click:::::::::::::::::::" + ex.Message);
     }
 }
Ejemplo n.º 7
0
        private void LoadCustomer()
        {
            flpListAcc.Controls.Clear();
            var listCustomer = CustomerService.GetCustomer();
            int i = 0;
            foreach (CustomerModel item in listCustomer)
            {
                UCCustomerItem ucCusItem = new UCCustomerItem();
                ucCusItem.lblCusID.Text = item.ClientID.ToString();
                ucCusItem.lblCusName.Text = item.Fname + " " + item.Lname;
                ucCusItem.lblCusPhone.Text = item.Phone;
                ucCusItem.lblDetail.Text = "View";
                ucCusItem.Click += ucCusItem_Click;
                ucCusItem.Width = flpListAcc.Width;
                ucCusItem.Tag = item;
                if (i % 2 == 0)
                    ucCusItem.BackColor = Color.FromArgb(255, 255, 255);
                else
                    ucCusItem.BackColor = Color.FromArgb(242, 242, 242);
                flpListAcc.Controls.Add(ucCusItem);
                i++;

            }
        }
Ejemplo n.º 8
0
        private void LoadCustomer()
        {
            try
            {
                flpCustomer.Controls.Clear();
                var listCustomer = CustomerService.GetCustomer();
                int i = 0;
                foreach (CustomerModel item in listCustomer)
                {
                    UCCustomerItem ucCusItem = new UCCustomerItem();
                    ucCusItem.lblCusID.Text = item.ClientID.ToString();
                    ucCusItem.lblCusName.Text = item.Fname + " " + item.Lname;
                    ucCusItem.lblCusPhone.Text = item.Phone;
                    ucCusItem.lblDetail.Text = "View";
                    ucCusItem.Click += ucCusItem_Click;
                    ucCusItem.Width = flpCustomer.Width;
                    ucCusItem.Tag = item;
                    if (i % 2 == 0)
                        ucCusItem.BackColor = Color.FromArgb(255, 255, 255);
                    else
                        ucCusItem.BackColor = Color.FromArgb(242, 242, 242);
                    flpCustomer.Controls.Add(ucCusItem);
                    i++;

                }
            }
            catch (Exception ex)
            {
                SystemLog.LogPOS.WriteLog("frmCustomer::::::::::::::::LoadCustomer:::::::::::::::::::::" + ex.Message);
            }
        }