コード例 #1
0
ファイル: frmAccountDebit.cs プロジェクト: pcthanh/POS
        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;
        }
コード例 #2
0
ファイル: frmAccountDebit.cs プロジェクト: pcthanh/POS
        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++;
            }
        }
コード例 #3
0
ファイル: frmCustomer.cs プロジェクト: pcthanh/POS
 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);
     }
 }
コード例 #4
0
ファイル: frmPaymentAcc.cs プロジェクト: pcthanh/POSEZ2U
        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++;
            }
        }
コード例 #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);
 }
コード例 #6
0
ファイル: frmCustomer.cs プロジェクト: pcthanh/POS
 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);
     }
 }
コード例 #7
0
ファイル: frmPaymentAcc.cs プロジェクト: pcthanh/POSEZ2U
        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++;

            }
        }
コード例 #8
0
ファイル: frmCustomer.cs プロジェクト: pcthanh/POSEZ2U
        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);
            }
        }