private void vewclnt()
 {
     this.Text          = "معلومات زبون";
     this.label10.Text  = "معلومات زبون";
     groupBox1.Visible  = true;
     groupBox1.Location = new Point(this.Width / 4, 50);
     BLL.Client tp = BLL.Client.GetClientByID(_idr);
     groupBox1.Controls["textBox1"].Text = tp.Name;
     groupBox1.Controls["txtdet"].Text   = tp.Details.ToString();
     groupBox1.Controls["label2"].Text   = tp.AddedDate.ToString();
 }
Exemplo n.º 2
0
        void go(object alcll)
        {
            double stramnt = 0;

            foreach (BLL.ClientDeal curcl in (List <BLL.ClientDeal>)alcll)
            {
                ///  curcl.Details = "مجموعة ب " + numbertextbox1.Text + "ل.س " + "دفع نقدا   " + handclnt.Text;
                curcl.InsertClientDeal(true);
                stramnt = curcl.Amount;
                if (curcl.TheUnit == TheUnito.Gram)
                {
                    stramnt = curcl.Amount / 1000;
                }
                BLL.Store.InsertStoreFromClient(curcl.TypeId, stramnt, DateTime.Now, curcl.TypeName);
            }
            BLL.Client clo = (BLL.Client)combocompany.SelectedItem;
            clo.Balance += double.Parse(numbertextbox1.Text) - double.Parse(numbertextbox2.Text);
            clo.UpdateClient();
            WeightsOrganizer.Controls.Righto.GetDataAgainTostory();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            button1.Enabled = false;
            double stramnt = 0;
            List <BLL.SalesReturns> alcll = new List <WeightsOrganizer.BLL.SalesReturns>();

            try
            {
                alcll = (List <BLL.SalesReturns>)dataGridView1.DataSource;
            }
            catch { }
            BLL.SalesReturns.InsertClientDeal(alcll);
            BLL.Client clo = (BLL.Client)combocompany.SelectedItem;
            if (clo.ID != Globals.Globals.UnknownClient)
            {
                clo.Balance -= double.Parse(numbertextbox1.Text);
                clo.UpdateClient();
            }

            ALlPrice = 0;
            alloo    = new List <WeightsOrganizer.BLL.SalesReturns>();
            dataGridView1.DataSource = new object();
            combocompany.Enabled     = true;
            checkBox1.Enabled        = true;
            groupBox3.Enabled        = true;
            numbertextbox1.Text      = "0";
            numbertextbox2.Text      = "0";
            handclnt.Text            = "0";

            combocompany.SelectedValue = Globals.Globals.UnknownClient;
            if (frmRealMainForm.FrmTypso != null && frmRealMainForm.FrmTypso.Name == "frmSalesReturn")
            {
                frmRealMainForm.FrmTypso.MyRefresh();
            }
            button1.Enabled = true;
        }
Exemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            button1.Enabled = false;
            double paidprc = 0;

            try
            {
                paidprc = double.Parse(numbertextbox2.Text);
                if (paidprc > 0)
                {
                    if (double.Parse(handclnt.Text) > paidprc)
                    {
                        MessageBox.Show(" الباقي للزبون   " + (double.Parse(handclnt.Text) - paidprc).ToString() + "  ل.س  ");
                    }
                }
            }
            catch { }

            List <BLL.ClientDeal> alcll = new List <WeightsOrganizer.BLL.ClientDeal>();

            try
            {
                alcll = (List <BLL.ClientDeal>)dataGridView1.DataSource;
            }
            catch { }
            //Add Lista...
            WeightsOrganizer.BLL.ClientDeal.InsertGroup(alcll);
            BLL.Client clo = (BLL.Client)combocompany.SelectedItem;
            clo.Balance += double.Parse(numbertextbox1.Text) - double.Parse(numbertextbox2.Text);
            clo.UpdateClient();
            if (Globals.Globals.PrintWhenSell)
            {
                try
                {
                    if ((int)combocompany.SelectedValue != Globals.Globals.UnknownClient)
                    {
                        Globals.Globals.PrintNow(dataGridView1, "السيد " + combocompany.Text, string.Format("المجموع {0} ل.س ", ALlPrice) + Environment.NewLine + " الباقي " + (ALlPrice - paidprc).ToString() + " ل.س ", true);
                    }
                    else
                    {
                        Globals.Globals.PrintNow(dataGridView1, "بتوقيت ", string.Format("المجموع {0} ل.س ", ALlPrice), true);
                    }
                }
                catch { }
            }
            ALlPrice = 0;
            alloo    = new List <WeightsOrganizer.BLL.ClientDeal>();
            dataGridView1.DataSource   = new object();
            combocompany.Enabled       = true;
            checkBox1.Enabled          = true;
            groupBox3.Enabled          = true;
            numbertextbox1.Text        = "0";
            numbertextbox2.Text        = "0";
            handclnt.Text              = "0";
            combocompany.SelectedValue = Globals.Globals.UnknownClient;
            if (frmRealMainForm.FrmTypso != null && frmRealMainForm.FrmTypso.Name == "frmclientdeal")
            {
                frmRealMainForm.FrmTypso.MyRefresh();
            }
            button1.Enabled = true;
        }