Exemple #1
0
        private void DisplayData()
        {
            string vWhere = string.Empty;

            if (!string.IsNullOrEmpty(txtFilter.Text))
            {
                vWhere = " AND PartyName Like '%" + txtFilter.Text + "%'";
            }

            if (vIsVendor)
            {
                vWhere += " AND Isnull(IsSupplier,0)=1";
            }

            if (vIsCustomer)
            {
                vWhere += " AND Isnull(IsCustomer,0)=1";
            }

            try
            {
                DAL.Searches objDAL = new DAL.Searches();
                objDAL.connectionstring = connectionString;
                dt = objDAL.getParties(vWhere, vWithAccounts, vIsJV);
                Grid.DataSource = dt;
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message.ToString());
            }
        }
Exemple #2
0
        private void DisplayData()
        {
            string vWhere = string.Empty;

            if (!string.IsNullOrEmpty(txtFilter.Text))
            {
                vWhere = " AND Products.ProductName Like '%" + txtFilter.Text + "%'";
            }

            if (vIsSaleable)
            {
                vWhere += " AND Isnull(Products.IsRawMaterial,0)=0";
            }

            if (vIsConsumable)
            {
                vWhere += " AND Isnull(Products.IsRawMaterial,0)=1";
            }

            try
            {
                DAL.Searches objDAL = new DAL.Searches();
                objDAL.connectionstring = connectionString;
                dt = objDAL.getProducts(vWhere);
                Grid.DataSource = dt;
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message.ToString());
            }
        }
Exemple #3
0
        private void DisplayData()
        {
            string vWhere = string.Empty;

            if (!string.IsNullOrEmpty(txtFilter.Text))
            {
                vWhere = " AND ( BankDeposits.AccountNo Like '" + txtFilter.Text + "%' AND BankDeposits.BankAccountNo Like '" + txtFilter.Text + "%')";
            }


            if (vIsChequeDep)
            {
                vWhere += " AND Isnull(BankDeposits.IsCheque,0) =1";
            }
            else
            {
                vWhere += " AND Isnull(BankDeposits.IsCheque,0) =0";
            }

            try
            {
                DAL.Searches objDAL = new DAL.Searches();
                objDAL.connectionstring = connectionString;
                dt = objDAL.getDeposits(vWhere);
                Grid.AutoGenerateColumns = false;
                Grid.DataSource          = dt;
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message.ToString());
            }
        }
Exemple #4
0
        private void txt_ProductID_TextChanged(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txt_ProductID.Text))
            {
                ClearBodyControls();
            }
            else
            {
                string vWhere = string.Empty;
                vWhere = "AND Products.ProductID = " + txt_ProductID.Text;
                DAL.Searches obj = new DAL.Searches();
                obj.connectionstring = System.Configuration.ConfigurationManager.ConnectionStrings["MyString"].ConnectionString;
                DataTable dt = obj.getProducts(vWhere);

                if (dt.Rows.Count > 0)
                {
                    txt_ProductID.Text   = dt.Rows[0]["ProductID"].ToString();                                // vForm.MyID;
                    txt_ProductName.Text = dt.Rows[0]["ProductName"].ToString();                              // vForm.MyName;
                    txtUnit.Text         = dt.Rows[0]["UnitTitle"].ToString();                                //vForm.MyUnitName;
                    txtUnit.Tag          = dt.Rows[0]["UnitID"].ToString();                                   //vForm.MyUnitID.ToString();
                    txt_Qty.Tag          = dt.Rows[0]["Units"].ToString();                                    //vForm.MyMultiplier.ToString("G29");
                    txt_Price.Text       = decimal.Parse(dt.Rows[0]["SalePrice"].ToString()).ToString("G29"); //Math.Round(vForm.MyPurPrice, 2).ToString("G29");
                    txt_Qty.Focus();
                    GetCurrentStock(Int64.Parse(txt_ProductID.Text));
                }
            }
        }
Exemple #5
0
        private void DisplayData()
        {
            string vWhere = string.Empty;

            if (!string.IsNullOrEmpty(txtFilter.Text))
            {
                vWhere = " AND PartyName Like '%" + txtFilter.Text + "%'";
            }

            vWhere += string.Format(" And convert(datetime,Convert(varchar,Sale.EntryDate,1)) Between Convert(Datetime,(convert(varchar,convert(Datetime,'{0} 00:00:00',102),1)))and Convert(Datetime,(convert(varchar,convert(Datetime,'{1} 00:00:00',102),1)))", dt_From.Value.ToShortDateString(), dt_ToDate.Value.ToShortDateString());

            if (vIsFromReturn)
            {
                vWhere += " AND SaleID NOT IN (Select SaleID From SaleReturn)";
            }

            try
            {
                DAL.Searches objDAL = new DAL.Searches();
                objDAL.connectionstring = connectionString;
                dt = objDAL.getSale(vWhere);
                Grid.DataSource = dt;
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message.ToString());
            }
        }
Exemple #6
0
        private void txt_ProductID_TextChanged(object sender, EventArgs e)
        {
            //if (string.IsNullOrEmpty(txt_ProductID.Text)) txt_ProductName.Text = string.Empty;
            if (string.IsNullOrEmpty(txt_ProductID.Text))
            {
                txt_ProductName.Text = string.Empty;
            }
            if (string.IsNullOrEmpty(txt_ProductID.Text))
            {
                txt_ProductName.Text = string.Empty;
            }
            else
            {
                string vWhere = string.Empty;
                vWhere = "AND Products.ProductID = " + txt_ProductID.Text;
                DAL.Searches obj = new DAL.Searches();
                obj.connectionstring = System.Configuration.ConfigurationManager.ConnectionStrings["MyString"].ConnectionString;
                DataTable dt = obj.getProducts(vWhere);

                if (dt.Rows.Count > 0)
                {
                    txt_ProductID.Text   = dt.Rows[0]["ProductID"].ToString();   // vForm.MyID;
                    txt_ProductName.Text = dt.Rows[0]["ProductName"].ToString(); // vForm.MyName;
                }
            }
        }
Exemple #7
0
        private void DisplayData()
        {
            string vWhere = string.Empty;

            if (!string.IsNullOrEmpty(txtFilter.Text))
            {
                vWhere = " AND PartyName Like '%" + txtFilter.Text + "%'";
            }

            if (vIsFromReturn)
            {
                vWhere += " AND PurchaseID NOT IN(Select PurchaseID From PurReturn)";
            }

            try
            {
                DAL.Searches objDAL = new DAL.Searches();
                objDAL.connectionstring = connectionString;
                dt = objDAL.getPurchases(vWhere);
                Grid.DataSource = dt;
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message.ToString());
            }
        }
Exemple #8
0
        private void DisplayData()
        {
            string vWhere = string.Empty;

            if (!string.IsNullOrEmpty(txtFilter.Text))
            {
                vWhere = " AND VoucherHeader.VoucherID Like '" + txtFilter.Text + "%'";
            }

            if (!string.IsNullOrEmpty(cboVoucherType.Text))
            {
                vWhere += " AND VoucherHeader.VoucherType ='" + getVoucherType() + "'";
            }

            try
            {
                DAL.Searches objDAL = new DAL.Searches();
                objDAL.connectionstring = connectionString;
                dt = objDAL.getVouchers(vWhere);
                Grid.DataSource = dt;
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message.ToString());
            }
        }
Exemple #9
0
 public static DTO.searches convertToDTO(DAL.Searches s)
 {
     return(new DTO.searches
     {
         Adress = s.Adress,
         Category = s.Category,
         fingerPrint = s.fingerPrint,
         Id = s.Id
     });
 }
Exemple #10
0
        private void txt_ProductID1_TextChanged_1(object sender, EventArgs e)
        {
            if (txt_ProductID1.Text != string.Empty)
            {
                string vWhere = string.Empty;
                //vForm.IsSaleable = true;
                //vForm.IsConsumable = false;

                bool IsSaleable   = true;
                bool IsConsumable = false;
                //vWhere = "AND ";

                if (IsSaleable)
                {
                    vWhere += " AND Isnull(Products.IsRawMaterial,0)=0 ";
                }

                if (IsConsumable)
                {
                    vWhere += " AND Isnull(Products.IsRawMaterial,0)=1 ";
                }
                vWhere += "AND Products.ProductID = " + txt_ProductID1.Text;
                DAL.Searches obj = new DAL.Searches();
                obj.connectionstring = System.Configuration.ConfigurationManager.ConnectionStrings["MyString"].ConnectionString;
                DataTable dt = obj.getProducts(vWhere);

                if (dt.Rows.Count > 0)
                {
                    txt_ProductID1.Text   = dt.Rows[0]["ProductID"].ToString();   // vForm.MyID;
                    txt_ProductName1.Text = dt.Rows[0]["ProductName"].ToString(); // vForm.MyName;
                    txtUnit1.Text         = dt.Rows[0]["UnitTitle"].ToString();   //vForm.MyUnitName;
                    txtUnit1.Tag          = dt.Rows[0]["UnitID"].ToString();      //vForm.MyUnitID.ToString();
                    txt_Qty1.Tag          = dt.Rows[0]["Units"].ToString();       //vForm.MyMultiplier.ToString("G29");

                    //txt_Qty1.Focus();
                    GetCurrentStock1(Int64.Parse(txt_ProductID1.Text));
                }
            }
            else
            {
                ClearBodyControls1();
            }
        }
Exemple #11
0
        private void DisplayData()
        {
            string vWhere = string.Empty;

            if (!string.IsNullOrEmpty(txtFilter.Text))
            {
                vWhere = " AND Narration Like '%" + txtFilter.Text + "%'";
            }

            try
            {
                DAL.Searches objDAL = new DAL.Searches();
                objDAL.connectionstring = connectionString;
                dt = objDAL.getProduction(vWhere);
                Grid.DataSource = dt;
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message.ToString());
            }
        }
Exemple #12
0
        private void DisplayData()
        {
            string vWhere = string.Empty;

            if (!string.IsNullOrEmpty(txtFilter.Text))
            {
                vWhere = " AND ShareMembers.MemberName Like '%" + txtFilter.Text + "%'";
            }


            try
            {
                DAL.Searches objDAL = new DAL.Searches();
                objDAL.connectionstring = connectionString;
                dt = objDAL.getSharesIssue(vWhere);
                Grid.AutoGenerateColumns = false;
                Grid.DataSource          = dt;
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.Message.ToString());
            }
        }