Example #1
0
 private void buttonSubmit_Click(object sender, EventArgs e)
 {
     try
     {
         if (tbInvoice.Text == "" || tbCustomerName.Text == "")
         {
             JIMessageBox.ExclamationMessage("Please Fill Invoice No & Customer Name !"); return;
         }
         bool   Status        = false;
         string StatusDetails = null;
         int    SalesOrderID  = 0;
         if (gridViewPRODUCT.Rows.Count > 0 && gridViewPICTURE.Rows.Count > 0) //Both
         {
             udm_PictureANDProductAddToDatabaseBOTH(Status, StatusDetails, SalesOrderID);
         }
         else if (gridViewPRODUCT.Rows.Count >= 1 && gridViewPICTURE.Rows.Count <= 0) //Product
         {
             udm_OnlyProductAddToDatabase(Status, StatusDetails, SalesOrderID);
         }
         else
         if (gridViewPICTURE.Rows.Count >= 1 && gridViewPRODUCT.Rows.Count <= 0)   //Picture
         {
             udm_OnlyPicureAddToDatabase(Status, StatusDetails, SalesOrderID);
         }
         else
         {
             JIMessageBox.ExclamationMessage("Cart is Empty !");
         }
     }
     catch (Exception ex)
     {
         JIMessageBox.ErrorMessage(ex.ToString());
     }
 }
Example #2
0
        private void buttonUpdateProduct_Click(object sender, EventArgs e)
        {
            bool   Status        = false;
            string StatusDetails = null;

            try
            {
                if (comboBocCategory.Text == "" || textBoxProductType.Text == "" || textBoxBrand.Text == "" ||
                    textBoxSize.Text == "" || textBoxColour.Text == "" || textBoxBarcode.Text == "")
                {
                    JIMessageBox.ExclamationMessage("Fill All Fields !"); return;
                }
                string Photo = ImageClass.GetBase64StringFromImage(Imager.Resize(pictureBoxProduct.Image, 200, 200, true)); //Resize & Convert to String

                MainClass.POS.usp_UpdateProduct(Convert.ToInt32(labelProductID.Text),
                                                Convert.ToInt32(comboBocCategory.SelectedValue), textBoxProductType.Text,
                                                textBoxBrand.Text, textBoxSize.Text, textBoxColour.Text, Photo, textBoxBarcode.Text,
                                                out Status, out StatusDetails);
                if (Status)
                {
                    JIMessageBox.InformationMessage("Record Updated Succesfully !");
                    displayProduct();
                    //  clearTextBox();
                }
                else
                {
                    MessageBox.Show(StatusDetails, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void textBoxPurchaseUnitPrice_Leave(object sender, EventArgs e)
        {
            try
            {
                if (Convert.ToInt32(textBoxPurchaseUnitPrice.Text) <= 0)
                {
                    JIMessageBox.ExclamationMessage("Purchase Unit Price Field is less then 1 !");
                    textBoxPurchaseUnitPrice.Focus();
                    return;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                textBoxPurchaseUnitPrice.Focus();
                return;
            }



            //public bool checkValidation()
            //{
            //   if( cbCategory.Text == null &&
            //    cbType.Text == null &&
            //    cbBrand.Text == null &&
            //    cbSize.Text == null &&
            //    cbColor.Text == null &&
            //    textBoxBarcode.Text = null
            //    ) { }
            //}
        }
Example #4
0
 private void tbProductQty_Leave(object sender, EventArgs e)
 {
     try
     {
         //tbProductAvailableQty
         if (tbProductAvailableQty.Text == null || tbProductAvailableQty.Text == "")
         {
             JIMessageBox.ExclamationMessage("Available Stock Field is Empty !");
             return;
         }
         {
             try
             {
                 if (Convert.ToInt32(tbProductQty.Text) > Convert.ToInt32(tbProductAvailableQty.Text))
                 {
                     JIMessageBox.AsteriskMessage("Available Stock is :  " + tbProductAvailableQty.Text + " !");
                     tbProductQty.Focus();
                 }
             }
             catch (Exception)
             {
                 tbProductQty.Focus();
                 JIMessageBox.ErrorMessage("Please Enter Digit !");
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         tbAdvance.Focus();
     }
 }
Example #5
0
 private void udmPicFieldValidation()
 {
     if (cbPicCategory.Text == "")
     {
         JIMessageBox.ExclamationMessage("Please Select " + cbPicCategory.Text + " !"); return;
     }
     if (cbPicType.Text == "")
     {
         JIMessageBox.ExclamationMessage("Please Select Type !"); return;
     }
     if (cbPicBrand.Text == "")
     {
         JIMessageBox.ExclamationMessage("Please Select Brand !"); return;
     }
     if (tbPicNumber.Text == "")
     {
         JIMessageBox.ExclamationMessage("Please Select Picture No !"); return;
     }
     if (tbPicUnitPrice.Text == "")
     {
         JIMessageBox.ExclamationMessage("Please Select UnitPrice !"); return;
     }
     if (tbPicQty.Text == "")
     {
         JIMessageBox.ExclamationMessage("Please Select Qty !"); return;
     }
     if (tbPicTotalPrice.Text == "")
     {
         JIMessageBox.ExclamationMessage("Please Select Total Price !"); return;
     }
 }
        private void btnBackup_Click(object sender, EventArgs e)
        {
            string database = con.Database.ToString();

            try
            {
                if (pathtext.Text == string.Empty)
                {
                    MessageBox.Show("please select the path for backup");
                }
                else
                {
                    string cmd = "BACKUP DATABASE [" + database + "] TO DISK='" + pathtext.Text + "\\" + "database" + "-" + DateTime.Now.ToString("yyyy-MM-dd--HH-mm-ss") + ".bak'";
                    using (SqlCommand command = new SqlCommand(cmd, con))
                    {
                        if (con.State != ConnectionState.Open)
                        {
                            con.Open();
                        }
                        command.ExecuteNonQuery();
                        con.Close();
                        MessageBox.Show("Database backup created Successfully");
                        btnBackup.Enabled = false;
                        pathtext.Clear();
                    }
                }
            }
            catch (Exception ex)
            {
                JIMessageBox.ExclamationMessage(ex.Message);
            }
        }
Example #7
0
        private void buttonDelete_Click(object sender, EventArgs e)
        {
            bool   Status        = false;
            string StatusDetails = null;

            try
            {
                if (textBoxCategoryName.Text == "" || textBoxCategoryName.Text == null)
                {
                    JIMessageBox.ExclamationMessage("Please Fill Field! \n Thank You"); return;
                }
                ;
                ModelClass.ModelPOS.ModelCategory mCategory = new ModelClass.ModelPOS.ModelCategory()
                {
                    CategoryID = int.Parse(labelCategoryID.Text), CategoryName = textBoxCategoryName.Text
                };
                MainClass.POS.CRUDCategoryDelete(mCategory, out Status, out StatusDetails);
                if (Status)
                {
                    MessageBox.Show(StatusDetails, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    displayCategory();
                }
                else
                {
                    MessageBox.Show(StatusDetails, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #8
0
        private void btnCadetRegister_Click(object sender, EventArgs e)
        {
            bool   Status        = false;
            string StatusDetails = null;

            try
            {
                if (textBoxCategoryName.Text == "" || textBoxCategoryName.Text == null)
                {
                    JIMessageBox.ExclamationMessage("Please Fill Field! \n Thank You"); return;
                }
                ;
                string CategoryName = textBoxCategoryName.Text;
                MainClass.POS.CRUDCategoryCreate(CategoryName, out Status, out StatusDetails);
                if (Status)
                {
                    MessageBox.Show(StatusDetails, "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    textBoxCategoryName.Text = "";
                    displayCategory();
                    textBoxCategoryName.Focus();
                }
                else
                {
                    MessageBox.Show(StatusDetails, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #9
0
 private void buttonAddProduct_Click(object sender, EventArgs e)
 {
     if (comboBocCategory.Text == "" || textBoxProductType.Text == "" || textBoxBrand.Text == "" ||
         textBoxSize.Text == "" || textBoxColour.Text == "" || textBoxBarcode.Text == "")
     {
         JIMessageBox.ExclamationMessage("Fill All Fields !"); return;
     }
     createProduct();
     displayProduct();
 }
        private void buttonUpdateInvoice_Click(object sender, EventArgs e)
        {
            bool   Status        = false;
            string StatusDetails = null;

            try
            {
                if (tbSearchInvocie.Text == "")
                {
                    JIMessageBox.ExclamationMessage("Please Enter Invoice Number"); return;
                }
                if (tbSearchInvocie.Text != "")
                {
                    if (tbCustomerName.Text == "")
                    {
                        JIMessageBox.ExclamationMessage("Details Not Available !"); return;
                    }
                }


                MainClass.POS.usp_UpdateCustomer(Convert.ToInt32(labelCustomerID.Text), tbCustomerName.Text, tbContact.Text, rtbDetails.Text, out Status, out StatusDetails);
                if (Status == false)
                {
                    JIMessageBox.WarningMessage(StatusDetails);
                }
                else
                {
                    //CODE
                }

                //dtCurrentDate.Value = dtCurrentDate.Value == null ? DateTime.Now : dtCurrentDate.Value;
                //dtDueDate.Value = dtDueDate.Value == null ? DateTime.Now : dtDueDate.Value;
                MainClass.POS.UpdateSalesOrder(
                    Convert.ToInt32(labelSalesOrderID.Text), dtCurrentDate.Value, dtDueDate.Value,
                    Convert.ToInt32(tbGrandTotal.Text), Convert.ToInt32(tbAdvance.Text),
                    Convert.ToInt32(tbBalance.Text), tbSearchInvocie.Text,
                    out Status, out StatusDetails);
                if (Status == false)
                {
                    JIMessageBox.WarningMessage(StatusDetails);
                }
                else
                {
                    JIMessageBox.InformationMessage("Record Updated Successfully !");
                }
            }
            catch (Exception ex)
            {
                JIMessageBox.WarningMessage(ex.ToString());
            }
        }
        private void btnCadetRegister_Click(object sender, EventArgs e)
        {
            if (textBoxBarcode.Text == "" || textBoxBarcode.Text == null)
            {
                JIMessageBox.ExclamationMessage("Enter Barcode First!");
                return;
            }
            if (textBoxPurchaseUnitPrice.Text == "" || textBoxQty.Text == "" || cbSupplier.Text == "")
            {
                JIMessageBox.ExclamationMessage("Please Fill All Fields !");
                return;
            }

            createPurchase();
        }
 private void textBoxQty_Leave(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToInt32(textBoxQty.Text) <= 0)
         {
             JIMessageBox.ExclamationMessage("Purchase Qty Field is less then 1 !");
             textBoxQty.Focus();
             return;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         textBoxPurchaseUnitPrice.Focus();
         return;
     }
 }
 private void buttonUpdate_Click(object sender, EventArgs e)
 {
     if (labelPurchaseID.Text == "" || labelPurchaseID.Text == "PurchaseID")
     {
         JIMessageBox.ExclamationMessage("Please Select Row From Table !");
         return;
     }
     if (textBoxBarcode.Text == "" || textBoxBarcode.Text == null)
     {
         JIMessageBox.ExclamationMessage("Enter Barcode First!");
         return;
     }
     if (textBoxPurchaseUnitPrice.Text == "" || textBoxQty.Text == "")
     {
         JIMessageBox.ExclamationMessage("Please Fill All Fields !");
         return;
     }
     updatePurchase();
 }
Example #14
0
 private void buttonUpdateSupplier_Click(object sender, EventArgs e)
 {
     try
     {
         if (textBoxName.Text == "" ||
             textBoxPhone.Text == "" ||
             textBoxMobile.Text == "" ||
             textBoxAddress.Text == ""
             )
         {
             JIMessageBox.ExclamationMessage("Please Fill All Fields !"); return;
         }
         updateSupplier();
     }
     catch (Exception ex)
     {
         JIMessageBox.ErrorMessage(ex.Message);
     }
 }
Example #15
0
 private void btnCadetRegister_Click(object sender, EventArgs e)
 {
     try
     {
         if (textBoxName.Text == "" ||
             textBoxPhone.Text == "" ||
             textBoxMobile.Text == "" ||
             textBoxAddress.Text == ""
             )
         {
             JIMessageBox.ExclamationMessage("Please Fill All Fields !"); return;
         }
         createSupplier();
         displaySupplier();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
        private void tbSearchBarcode_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)13)
            {
                bool   Status        = false;
                string StatusDetails = null;
                try
                {
                    if (tbSearchBarcode.Text == "")
                    {
                        JIMessageBox.ExclamationMessage("Please Enter Barcode !"); return;
                    }
                    ;

                    DataTable dt = MainClass.Reporting.usp_BarcodeReport(tbSearchBarcode.Text, out Status, out StatusDetails);
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        dt.Rows[i]["pDate"] = Convert.ToString(dtPurchaseDateReport.Value.ToString("dddd, dd MMMM yyyy"));
                    }

                    reportViewerBarcode.LocalReport.DataSources.Clear();
                    reportViewerBarcode.LocalReport.ReportPath = "Reports/ReportBarcode.rdlc";
                    //Table
                    ReportDataSource Rds = new ReportDataSource();
                    Rds.Name  = "DataSetBarcode";
                    Rds.Value = dt;
                    reportViewerBarcode.LocalReport.DataSources.Add(Rds);
                    //--------------//

                    reportViewerBarcode.RefreshReport();
                    e.Handled = true;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
Example #17
0
        private void btnExpensesInsert_Click(object sender, EventArgs e)
        {
            bool   Status        = false;
            string StatusDetails = null;

            try
            {
                if (comboBoxType.Text == "Select")
                {
                    JIMessageBox.ExclamationMessage("Please Select Type! \n Thank You"); return;
                }
                ;
                if (comboBoxType.Text == "" || textBoxTitle.Text == "")
                {
                    JIMessageBox.ExclamationMessage("Please Fill Field! \n Thank You"); return;
                }
                ;
                string _date      = datePicker.Value.ToString("dd/MM/yyyy ");
                string _time      = timePicker.Value.ToString("hh:mm:ss tt");
                string __datetime = _date + _time;
                MainClass.Expenses.InsertExpenses(Convert.ToInt32(textBoxAmount.Text), Convert.ToDateTime(_date + _time), ModelClass._UserID, textBoxTitle.Text, comboBoxType.Text, richTextBoxDetails.Text, out Status, out StatusDetails);
                if (Status)
                {
                    MessageBox.Show("Record Save Succesfully", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Clearr();
                    displayExpenses();
                }
                else
                {
                    MessageBox.Show(StatusDetails, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #18
0
 private void buttonAddToCart_Click(object sender, EventArgs e)
 {
     try
     {
         if (superTabItem1.IsSelected) //Product
         {
             if (labelProduct_ID.Text == "" || labelProduct_ID.Text == null)
             {
                 JIMessageBox.ExclamationMessage("Invalid Product !"); return;
             }
             udmPRODUCT_AddtoCart();
         }
         else
         if (superTabItem2.IsSelected) //Picture
         {
             udmPicFieldValidation();
             udmPICTURE_AddtoCart();
         }
     }
     catch (Exception ex)
     {
         JIMessageBox.ErrorMessage(ex.ToString());
     }
 }
Example #19
0
        private void udmPICTURE_AddtoCart()
        {
            DataTable dt  = TableHeadingNamePicture(); //Table
            DataRow   row = dt.NewRow();               //NewRow
                                                       //Header_Names
            string RadioValue = null;

            if (radiobtnStudio.Checked)
            {
                RadioValue = radiobtnStudio.Text;
            }
            if (radiobtnMedia.Checked)
            {
                RadioValue = radiobtnMedia.Text;
            }
            if (RadioValue == null)
            {
                JIMessageBox.ExclamationMessage("Please Select Studio/Media !"); return;
            }

            row["dtPicRadioValue"] = Convert.ToString(RadioValue);
            row["dtPicCategory"]   = Convert.ToString(cbPicCategory.Text);
            row["dtPicType"]       = Convert.ToString(cbPicType.Text);
            row["dtPicBrand"]      = Convert.ToString(cbPicBrand.Text);
            if (cbPicSize.Text != null)
            {
                row["dtPicSize"] = Convert.ToString(cbPicSize.Text);
            }
            else if (cbPicSize.Text == null && tbPicSize.Text != null)
            {
                row["dtPicSize"] = Convert.ToString(tbPicSize.Text);
            }
            else if (cbPicSize.Text != null && tbPicSize.Text != null)
            {
                JIMessageBox.InformationMessage("Both Sizes Are Selected !"); return;
            }
            else
            {
                JIMessageBox.InformationMessage("Please Select Size !"); return;
            }
            row["dtPicNumber"]     = Convert.ToInt32(tbPicNumber.Text);
            row["dtPicUnitPrice"]  = Convert.ToInt32(tbPicUnitPrice.Text);
            row["dtPicQty"]        = Convert.ToInt32(tbPicQty.Text);
            row["dtPicTotalPrice"] = Convert.ToInt32(tbPicTotalPrice.Text);
            if (PicImage.Image == null)
            {
                row["dtPicImage"] = "ImageNotSelected";
            }
            else
            {
                row["dtPicImage"] = ImageClass.GetBase64StringFromImage(Imager.Resize(PicImage.Image, 200, 200, true));
            }                 //Resize & Convert to String

            dt.Rows.Add(row); //NewRow_AddInDataTable
            foreach (DataRow r in dt.Rows)
            {                 //Array ValueParams
                gridViewPICTURE.Rows.Add(r["dtPicRadioValue"].ToString(), r["dtPicNumber"].ToString(),
                                         r["dtPicCategory"].ToString(), r["dtPicType"].ToString(), r["dtPicBrand"].ToString(),
                                         r["dtPicSize"].ToString(), r["dtPicUnitPrice"].ToString(),
                                         r["dtPicQty"].ToString(), r["dtPicTotalPrice"].ToString(), r["dtPicImage"].ToString()
                                         );
            }
            dt.AcceptChanges();

            //__GrandTotal__
            udmGrandTotal();
        }
        private void tbSearchInvocie_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)13)
            {
                bool   Status        = false;
                string StatusDetails = null;
                try
                {
                    DataTable dt1 = MainClass.POS.usp_CheckInvoiceNumberStep1(tbSearchInvocie.Text, out Status, out StatusDetails);
                    if (dt1.Rows.Count <= 0)
                    {
                        JIMessageBox.ExclamationMessage("SaleOrderSETP_1: DataTableis Empty !"); return;
                    }
                    if (Status == false)
                    {
                        JIMessageBox.WarningMessage("SaleOrderSETP_2: " + StatusDetails); return;
                    }
                    int       _SalesOrderID = Convert.ToInt32(dt1.Rows[0]["SalesOrderID"].ToString());
                    DataTable dt2           = MainClass.POS.usp_CheckInvoiceNumberStep2(_SalesOrderID, out Status, out StatusDetails);
                    if (Status == false)
                    {
                        JIMessageBox.ExclamationMessage("SaleOrderSETP_2: DataTable is Empty !"); return;
                    }
                    if (Status == false)
                    {
                        JIMessageBox.WarningMessage("SaleOrderSETP_2: " + StatusDetails); return;
                    }

                    labelSalesOrderID.Text = Convert.ToString(dt1.Rows[0]["SalesOrderID"]);
                    labelCustomerID.Text   = Convert.ToString(dt1.Rows[0]["CustomerID"]);
                    tbCustomerName.Text    = Convert.ToString(dt1.Rows[0]["CustomerName"]);
                    tbContact.Text         = Convert.ToString(dt1.Rows[0]["CustomerContact"]);
                    rtbDetails.Text        = Convert.ToString(dt1.Rows[0]["CustomerDetails"]);
                    dtCurrentDate.Value    = Convert.ToDateTime(dt1.Rows[0]["SalesOrderCurrentDate"]);
                    dtDueDate.Value        = Convert.ToDateTime(dt1.Rows[0]["SalesOrderDueDate"]);

                    tbAdvance.Text    = Convert.ToInt32(dt1.Rows[0]["Advance"]).ToString();
                    tbBalance.Text    = Convert.ToInt32(dt1.Rows[0]["Balance"]).ToString();
                    tbGrandTotal.Text = Convert.ToInt32(dt1.Rows[0]["TotalBill"]).ToString();

                    gridViewCheckInvoice.Rows.Clear();
                    foreach (DataRow r in dt2.Rows)
                    {
                        r["Color"]   = r["Color"].ToString() == "Color" ? "EMPTY" : r["Color"].ToString();
                        r["BarCode"] = r["BarCode"].ToString() == "BarCode" ? "EMPTY" : r["BarCode"].ToString();

                        gridViewCheckInvoice.Rows.Add(r["ID"].ToString(),
                                                      r["Category"].ToString(), r["Type"].ToString(),
                                                      r["Brand"].ToString(), r["Size"].ToString(), r["Color"].ToString(),
                                                      r["UnitPrice"].ToString(), r["Qty"].ToString(), r["UnitTotalPrice"].ToString(),
                                                      r["BarCode"].ToString());
                        dt2.AcceptChanges();
                    }
                }
                catch (Exception ex)
                {
                    JIMessageBox.WarningMessage(ex.ToString());
                }
                e.Handled = true;
            }
        }
Example #21
0
        private void buttonRemoveToCart_Click(object sender, EventArgs e)
        {
            try
            {
                //Remove
                Int32 selectedRowCount        = gridViewPRODUCT.Rows.GetRowCount(DataGridViewElementStates.Selected);
                Int32 selectedPictureRowCount = gridViewPICTURE.Rows.GetRowCount(DataGridViewElementStates.Selected);
                if (selectedRowCount > 0 || selectedPictureRowCount > 0)
                {
                    if (selectedRowCount > 0)
                    {
                        //Stock Plus_Minus
                        string QtyColumn = gridViewPRODUCT.Rows[gridViewPRODUCT.CurrentRow.Index].Cells["Qty"].Value.ToString();
                        tbProductAvailableQty.Text = Convert.ToString(Convert.ToInt32(tbProductAvailableQty.Text) + Convert.ToInt32(QtyColumn));

                        //Remove
                        for (int i = 0; i < selectedRowCount; i++)
                        {
                            gridViewPRODUCT.Rows.RemoveAt(gridViewPRODUCT.SelectedRows[0].Index);
                        }

                        int sum = 0;
                        for (int i = 0; i < gridViewPRODUCT.Rows.Count; i++)
                        {
                            sum += gridViewPRODUCT.Rows[i].Cells[8].Value == DBNull.Value ? 0 : Convert.ToInt32(gridViewPRODUCT.Rows[i].Cells[8].Value);
                        }
                        for (int i = 0; i < gridViewPICTURE.Rows.Count; i++)
                        {
                            sum += gridViewPICTURE.Rows[i].Cells[8].Value == DBNull.Value ? 0 : Convert.ToInt32(gridViewPICTURE.Rows[i].Cells[8].Value);
                        }
                        tbGrandTotal.Text = sum.ToString();
                    }

                    //PICURE_AREA
                    if (selectedPictureRowCount > 0)
                    {
                        for (int i = 0; i < selectedPictureRowCount; i++)
                        {
                            gridViewPICTURE.Rows.RemoveAt(gridViewPICTURE.SelectedRows[0].Index);
                        }

                        //Remove
                        int sum = 0;
                        for (int i = 0; i < gridViewPRODUCT.Rows.Count; i++)
                        {
                            sum += gridViewPRODUCT.Rows[i].Cells[8].Value == DBNull.Value ? 0 : Convert.ToInt32(gridViewPRODUCT.Rows[i].Cells[8].Value);
                        }
                        for (int i = 0; i < gridViewPICTURE.Rows.Count; i++)
                        {
                            sum += gridViewPICTURE.Rows[i].Cells[8].Value == DBNull.Value ? 0 : Convert.ToInt32(gridViewPICTURE.Rows[i].Cells[8].Value);
                        }

                        tbGrandTotal.Text = sum.ToString();
                    }
                }
                else
                {
                    JIMessageBox.ExclamationMessage("Please Select Row From Cart !");
                }
            }
            catch (Exception ex)
            {
                JIMessageBox.ErrorMessage(ex.ToString());
            }
        }