예제 #1
0
        private void grd_order_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 1)
            {
                // form_loader.Start_progres();
                //cProbar.startProgress();
                Order_Id = int.Parse(grd_order.Rows[e.RowIndex].Cells[12].Value.ToString());
                Order_Cost_Details inv = new Order_Cost_Details(Order_Id, userid, "Update", User_Role);
                inv.Show();
                //cProbar.stopProgress();
            }
            else if (e.ColumnIndex == 9)
            {
                form_loader.Start_progres();
                //cProbar.startProgress();
                Order_Id = int.Parse(grd_order.Rows[e.RowIndex].Cells[12].Value.ToString());
                View_Search_Document();
                //cProbar.stopProgress();
            }
            else if (e.ColumnIndex == 10)
            {
                dialogResult = MessageBox.Show("Do you Want to Proceed?", "Some Title", MessageBoxButtons.YesNo);
                if (dialogResult == DialogResult.Yes)
                {
                    form_loader.Start_progres();
                    //cProbar.startProgress();
                    Sub_Process_ID = int.Parse(grd_order.Rows[e.RowIndex].Cells[13].Value.ToString());
                    int    Order_Cost_Id = int.Parse(grd_order.Rows[e.RowIndex].Cells[14].Value.ToString());
                    string Order_Number  = grd_order.Rows[e.RowIndex].Cells[2].Value.ToString();
                    int    order_Id      = int.Parse(grd_order.Rows[e.RowIndex].Cells[12].Value.ToString());
                    string OrderCost     = grd_order.Rows[e.RowIndex].Cells[8].Value.ToString();

                    Hashtable htsearch = new Hashtable();
                    DataTable dtsearch = new DataTable();
                    htsearch.Add("@Trans", "GET_SEARCH_PACKAGE_DOCUEMNT_PATH");
                    htsearch.Add("@Order_ID", order_Id);
                    dtsearch = dataaccess.ExecuteSP("Sp_Order_Cost_Entry", htsearch);

                    if (dtsearch.Rows.Count > 0)
                    {
                        InvoiceRep.Order_Cost_Email inv = new InvoiceRep.Order_Cost_Email(Order_Number, userid, order_Id, Order_Cost_Id, Sub_Process_ID, OrderCost);

                        Geridview_Bind_Orders_Cost_Details();
                        //cProbar.stopProgress();
                    }
                    else
                    {
                        MessageBox.Show("Search Package is not added please check it");
                        //cProbar.stopProgress();
                    }
                }
                else if (dialogResult == DialogResult.No)
                {
                }
            }
        }
예제 #2
0
        private void btn_New_Invoice_Click(object sender, EventArgs e)
        {
            Order_Cost_Details invid = new Order_Cost_Details(0, userid, "Insert", User_Role);

            invid.Show();
        }