private void SearchByStyleNo()
        {
            ObjDAL.SetStoreProcedureData("PurchaseInvoiceID", SqlDbType.Int, txtPurchaseID.Text, clsConnection_DAL.ParamType.Input);
            ObjDAL.SetStoreProcedureData("StoreID", SqlDbType.Int, frmHome.Home_StoreID, clsConnection_DAL.ParamType.Input);
            ObjDAL.SetStoreProcedureData("ModelNo", SqlDbType.NVarChar, cmbListBox.Text, clsConnection_DAL.ParamType.Input);
            ObjDAL.SetStoreProcedureData("PrintStaus", SqlDbType.Int, 0, clsConnection_DAL.ParamType.Input);
            DataSet ds = ObjDAL.ExecuteStoreProcedure_Get(clsUtility.DBName + ".dbo.Get_PurchaseInvoice_BulkPrint_Color_Size");

            if (ObjUtil.ValidateDataSet(ds))
            {
                DataTable dtPurchaseInvDetails = ds.Tables[0];
                if (ObjUtil.ValidateTable(dtPurchaseInvDetails))
                {
                    dataGridView1.DataSource = dtPurchaseInvDetails;
                    //txtPurchaseID.Text = "";
                }
                else
                {
                    dataGridView1.DataSource = dtPurchaseInvDetails;
                    //txtPurchaseID.Clear();
                    clsUtility.ShowInfoMessage("No purchase invoice found for the given purhcase number.");
                }
            }
            ObjDAL.ResetData();
        }
Exemple #2
0
        private void btnViewDetails_Click(object sender, EventArgs e)
        {
            if (ObjUtil.IsControlTextEmpty(txtSupplierBillNo))
            {
                clsUtility.ShowInfoMessage("Please Enter Bill Number.", clsUtility.strProjectTitle);
                txtSupplierBillNo.Focus();
                return;
            }
            dgvPurchaseItem.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.EnableResizing;
            //Most time consumption enum is DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders
            dgvPurchaseItem.RowHeadersVisible = false; // set it to false if not needed

            ObjDAL.SetStoreProcedureData("BillNo", SqlDbType.NVarChar, txtPurchaseInvoiceID.Text, clsConnection_DAL.ParamType.Input);
            DataSet ds = ObjDAL.ExecuteStoreProcedure_Get("sp_DetailPurchaseInvoiceReport");

            if (ObjUtil.ValidateDataSet(ds))
            {
                dgvPurchaseInvoice.DataSource = ds.Tables[0];
                if (ds.Tables.Count > 1)
                {
                    dgvPurchaseInvoiceDetail.DataSource = ds.Tables[1];
                }
                if (ds.Tables.Count > 2)
                {
                    dgvPurchaseItem.DataSource = ds.Tables[2];
                }
                dgvPurchaseInvoice.ClearSelection();
                dgvPurchaseInvoiceDetail.ClearSelection();
                dgvPurchaseItem.ClearSelection();
            }
        }
        private void LoadData()
        {
            //DataTable dtPurchaseInvDetails = ObjCon.ExecuteSelectStatement("EXEC " + clsUtility.DBName + ".dbo.Get_PurchaseInvoice_BulkPrint_Color_Size '" + txtPurchaseID.Text + "'");
            ObjDAL.SetStoreProcedureData("PurchaseInvoiceID", SqlDbType.Int, txtPurchaseID.Text, clsConnection_DAL.ParamType.Input);
            ObjDAL.SetStoreProcedureData("StoreID", SqlDbType.Int, frmHome.Home_StoreID, clsConnection_DAL.ParamType.Input);
            ObjDAL.SetStoreProcedureData("ModelNo", SqlDbType.NVarChar, "0", clsConnection_DAL.ParamType.Input);
            ObjDAL.SetStoreProcedureData("PrintStaus", SqlDbType.Int, 0, clsConnection_DAL.ParamType.Input);
            DataSet ds = ObjDAL.ExecuteStoreProcedure_Get(clsUtility.DBName + ".dbo.Get_PurchaseInvoice_BulkPrint_Color_Size");

            if (ObjUtil.ValidateDataSet(ds))
            {
                btnResetPrint.Enabled = true;
                DataTable dtPurchaseInvDetails = ds.Tables[0];
                if (ObjUtil.ValidateTable(dtPurchaseInvDetails))
                {
                    dgvProductDetails.DataSource = dtPurchaseInvDetails;
                    CurrentPurchaseInvoiceID     = txtPurchaseID.Text;
                    //txtPurchaseID.Text = "";
                }
                else
                {
                    dgvProductDetails.DataSource = dtPurchaseInvDetails;
                    chkAll.Visible           = false;
                    CurrentPurchaseInvoiceID = "";
                    //txtPurchaseID.Clear();
                    clsUtility.ShowInfoMessage("No purchase invoice found for the given purhcase number.", clsUtility.strProjectTitle);
                    cmbListBox.DataSource = null;
                }
                if (ds.Tables.Count >= 1)
                {
                    DataTable dtStyleNo = ds.Tables[1];
                    if (ObjUtil.ValidateTable(dtStyleNo))
                    {
                        cmbListBox.DataSource    = dtStyleNo;
                        cmbListBox.DisplayMember = "ModelNo";
                        cmbListBox.ValueMember   = "ModelNo";
                        cmbListBox.SelectedIndex = -1;
                    }
                }
                if (ds.Tables.Count >= 2)
                {
                    DataTable dtProductPrint = ds.Tables[2];
                    if (ObjUtil.ValidateTable(dtProductPrint))
                    {
                        dataGridView1.DataSource = dtProductPrint;
                    }
                    else
                    {
                        dataGridView1.DataSource = null;
                    }
                }
            }
            else
            {
                btnResetPrint.Enabled = false;
            }
            chkAll.Visible = true;
        }
Exemple #4
0
        private void LoadData()
        {
            DataSet ds = ObjDAL.ExecuteStoreProcedure_Get(clsUtility.DBName + ".dbo.SPR_Get_Customer");

            if (ObjUtil.ValidateDataSet(ds))
            {
                DataTable dt = ds.Tables[0];
                if (ObjUtil.ValidateTable(dt))
                {
                    dgvCustomerMaster.DataSource = dt;
                }
                else
                {
                    dgvCustomerMaster.DataSource = null;
                }
            }
            else
            {
                dgvCustomerMaster.DataSource = null;
            }
        }
        private void LoadData()
        {
            DataSet ds = ObjDAL.ExecuteStoreProcedure_Get(clsUtility.DBName + ".dbo.SPR_Get_Employee");

            if (ObjUtil.ValidateDataSet(ds))
            {
                DataTable dataTable = ds.Tables[0];
                if (ObjUtil.ValidateTable(dataTable))
                {
                    dgvEmployee.DataSource = dataTable;
                    lblTotalRecords.Text   = "Total Employee Count : " + dgvEmployee.Rows.Count.ToString();
                }
                else
                {
                    dgvEmployee.DataSource = null;
                    lblTotalRecords.Text   = "Total Employee Count : 0";
                }
            }
            else
            {
                dgvEmployee.DataSource = null;
                lblTotalRecords.Text   = "Total Employee Count : 0";
            }
        }
Exemple #6
0
        private void btnPrintManualBarcode_Click(object sender, EventArgs e)
        {
            if (!IsBarCodeSettings())
            {
                clsUtility.ShowInfoMessage("Please set the Barcode design before barcode printing." + Environment.NewLine + "To Design Barcode, Open Barcode designer from Barcode menu from main window.");
                return;
            }
            ObjCon.SetStoreProcedureData("BarCodeNo", SqlDbType.NVarChar, txtBarcodenumber.Text, clsConnection_DAL.ParamType.Input);
            DataSet ds = ObjCon.ExecuteStoreProcedure_Get("SPR_GetQuickBarCodeDetails");

            if (ObjUtil.ValidateDataSet(ds))
            {
                dgvProductDetails.DataSource = ds.Tables[0];
                if (dgvProductDetails.Rows.Count > 0)
                {
                    PrintBarCode();
                }
                else
                {
                    clsUtility.ShowInfoMessage("can not find the barcode number : " + txtBarcodenumber.Text + ".");
                }
            }
        }