private void grd_Targetorder_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex != -1)
            {
                if (e.ColumnIndex == 17 && User_Role_Id != "2")
                {
                    string Order_Id  = grd_Targetorder.Rows[e.RowIndex].Cells[16].Value.ToString();
                    string Work_Type = grd_Targetorder.Rows[e.RowIndex].Cells[8].Value.ToString();

                    if (Work_Type == "Live")
                    {
                        Ordermanagement_01.Order_Entry Order_Entry = new Ordermanagement_01.Order_Entry(int.Parse(Order_Id.ToString()), Emp_User_Id, User_Role_Id.ToString(), "");
                        Order_Entry.Show();
                    }
                    else if (Work_Type == "Rework")
                    {
                        Ordermanagement_01.Rework_Superqc_Order_Entry orderentry = new Ordermanagement_01.Rework_Superqc_Order_Entry(int.Parse(Order_Id.ToString()), Emp_User_Id, "Rework", User_Role_Id.ToString(), "");
                        orderentry.Show();
                    }
                    else if (Work_Type == "Super Qc")
                    {
                        Ordermanagement_01.Rework_Superqc_Order_Entry orderentry = new Ordermanagement_01.Rework_Superqc_Order_Entry(int.Parse(Order_Id.ToString()), Emp_User_Id, "Superqc", User_Role_Id.ToString(), "");
                        orderentry.Show();
                    }
                }
            }
        }
        private void grd_order_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex != -1)
            {
                SplashScreenManager.ShowForm(this, typeof(Ordermanagement_01.Masters.WaitForm1), true, true, false);
                try
                {
                    string Order_Old_New = grd_order.Rows[e.RowIndex].Cells[17].Value.ToString();
                    // This If condition will get the Data From the Old Server
                    if (Order_Old_New == "Old")
                    {
                        Ordermanagement_01.Order_Entry_Old OrderEntryold = new Ordermanagement_01.Order_Entry_Old(int.Parse(grd_order.Rows[e.RowIndex].Cells[16].Value.ToString()), User_Id, userroleid);
                        OrderEntryold.Show();
                    }

                    else if (Order_Old_New == "New")
                    {
                        Ordermanagement_01.Order_Entry OrderEntry = new Ordermanagement_01.Order_Entry(int.Parse(grd_order.Rows[e.RowIndex].Cells[16].Value.ToString()), User_Id, userroleid, Production_Date);
                        OrderEntry.Show();
                    }
                }
                catch (Exception ex)
                {
                    //Close Wait Form
                    SplashScreenManager.CloseForm(false);
                    MessageBox.Show("Error Occured Please Check With Administrator");
                }
                finally
                {
                    //Close Wait Form
                    SplashScreenManager.CloseForm(false);
                }
            }
        }
 private void grd_Rpt_order_source_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 1)
     {
         int orderid = int.Parse(grd_Rpt_order_source.Rows[e.RowIndex].Cells[10].Value.ToString());
         Ordermanagement_01.Order_Entry orderentry = new Ordermanagement_01.Order_Entry(orderid, User_Id, Userroleid, "");
         orderentry.Show();
     }
 }
示例#4
0
 private void grd_Rpt_order_source_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex == 2)
     {
         //order view order id 10
         Ordermanagement_01.Order_Entry entry = new Ordermanagement_01.Order_Entry(int.Parse(grd_Rpt_order_source.Rows[e.RowIndex].Cells[0].Value.ToString()), Userid, userroleid, "");
         entry.Show();
     }
 }
 private void grd_order_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex != -1)
     {
         if (e.ColumnIndex == 2)
         {
             Ordermanagement_01.Order_Entry entry = new Ordermanagement_01.Order_Entry(int.Parse(grd_order.Rows[e.RowIndex].Cells[11].Value.ToString()), userid, userroleid, "");
             entry.Show();
         }
     }
 }
 private void GridView_General_Updates_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex != -1)
     {
         if (e.ColumnIndex == 4)
         {
             Ordermanagement_01.Order_Entry OrderEntry = new Ordermanagement_01.Order_Entry(int.Parse(GridView_General_Updates.Rows[e.RowIndex].Cells[16].Value.ToString()), User_Id, User_Role, "");
             OrderEntry.Show();
         }
     }
 }
示例#7
0
 private void grd_Admin_orders_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex != -1)
     {
         if (e.ColumnIndex == 3)
         {
             Ordermanagement_01.Order_Entry OrderEntry = new Ordermanagement_01.Order_Entry(int.Parse(grd_Admin_orders.Rows[e.RowIndex].Cells[9].Value.ToString()), User_Id, User_Role_Id, "");
             OrderEntry.Show();
         }
     }
 }
        private void grd_Targetorder_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 17)
            {
                //cProbar.startProgress();
                form_loader.Start_progres();

                Ordermanagement_01.Order_Entry OrderEntry = new Ordermanagement_01.Order_Entry(int.Parse(grd_Targetorder.Rows[e.RowIndex].Cells[12].Value.ToString()), Userid, userroleid, "");
                OrderEntry.Show();
                //cProbar.stopProgress();
            }
        }
        private void gridView2_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
        {
            var columnIndex = gridView2.FocusedColumn.VisibleIndex;

            if (columnIndex == 1)
            {
                System.Data.DataRow row = gridView2.GetDataRow(gridView2.FocusedRowHandle);
                int Order_ID            = int.Parse(row["Order_Id"].ToString());

                Ordermanagement_01.Order_Entry orderentry = new Ordermanagement_01.Order_Entry(Order_ID, Emp_User_Id, User_Role_Id, Production_Date);
                orderentry.Show();
            }
        }
示例#10
0
 private void grd_order_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (Rb_Move_To_Tier1Abs.Checked == true)
     {
         if (e.ColumnIndex == 2)
         {
             Ordermanagement_01.Order_Entry OrderEntry = new Ordermanagement_01.Order_Entry(int.Parse(grd_order.Rows[e.RowIndex].Cells[14].Value.ToString()), User_id, Convert.ToString(User_Role_ID), "");
             OrderEntry.Show();
         }
     }
     else if (rbtn_Move_Tier2_Inhouse.Checked == true)
     {
         if (e.ColumnIndex == 2)
         {
             Ordermanagement_01.Abstractor.Abstractor_Order_View OrderEntry = new Ordermanagement_01.Abstractor.Abstractor_Order_View(int.Parse(grd_order.Rows[e.RowIndex].Cells[14].Value.ToString()), User_id, User_Role_ID.ToString());
             OrderEntry.Show();
         }
     }
 }
示例#11
0
        private void grd_order_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == 1)
            {
                Ordermanagement_01.Order_Entry OrderEntry = new Ordermanagement_01.Order_Entry(int.Parse(grd_order.Rows[e.RowIndex].Cells[19].Value.ToString()), userid, userroleid, Production_Date);
                OrderEntry.Show();
            }
            if (e.ColumnIndex == 20)
            {
                var result = MessageBox.Show("Do Your want delete this Order from Database", "Confirmation", MessageBoxButtons.YesNo);
                if (result == DialogResult.Yes)
                {
                    Hashtable             htdelete = new Hashtable();
                    System.Data.DataTable dtdelete = new System.Data.DataTable();
                    htdelete.Add("@Trans", "DELETE");
                    htdelete.Add("@Order_ID", int.Parse(grd_order.Rows[e.RowIndex].Cells[19].Value.ToString()));
                    dtdelete = dataaccess.ExecuteSP("Sp_Order", htdelete);

                    MessageBox.Show("Order  Deleted Successfully");
                    //OrderHistory
                    Hashtable             ht_Order_History = new Hashtable();
                    System.Data.DataTable dt_Order_History = new System.Data.DataTable();
                    ht_Order_History.Add("@Trans", "INSERT");
                    ht_Order_History.Add("@Order_Id", int.Parse(grd_order.Rows[e.RowIndex].Cells[19].Value.ToString()));
                    //  ht_Order_History.Add("@User_Id", int.Parse(ddl_UserName.SelectedValue.ToString()));
                    //ht_Order_History.Add("@Status_Id", int.Parse(ddl_Order_Status_Reallocate.SelectedValue.ToString()));
                    //ht_Order_History.Add("@Progress_Id", 8);
                    ht_Order_History.Add("@Assigned_By", userid);
                    ht_Order_History.Add("@Modification_Type", "Order Delete");
                    ht_Order_History.Add("@Work_Type", 1);
                    dt_Order_History = dataaccess.ExecuteSP("Sp_Order_History", ht_Order_History);

                    BindGrid();
                    GridviewbindOrderdata();
                }
                else
                {
                }
            }
            if (e.ColumnIndex == 8)
            {
                //Ordermanagement_01.Order_Status Order_Status = new Ordermanagement_01.Order_Status();
                //Order_Status.Show();
            }
            if (e.ColumnIndex == 20)
            {
            }
            //if (e.ColumnIndex == 13 && Rb_Current.Checked==true)
            //{
            //  var result=  MessageBox.Show("Do you Want Delete this order", "confirmation", MessageBoxButtons.YesNo);
            //  if (result == DialogResult.No)
            //  {
            //      // cancel the closure of the form.
            //  }
            //  else
            //  {
            //      Hashtable htdelete = new Hashtable();
            //      System.Data.DataTable dtdelete = new System.Data.DataTable();
            //      htdelete.Add("@Trans", "DELETE");
            //      htdelete.Add("@Order_ID", int.Parse(grd_order.Rows[e.RowIndex].Cells[12].Value.ToString()));
            //      dtdelete = dataaccess.ExecuteSP("Sp_Order", htdelete);

            //      MessageBox.Show("Order  Deleted Successfully");

            //      //OrderHistory
            //      Hashtable ht_Order_History = new Hashtable();
            //      System.Data.DataTable dt_Order_History = new System.Data.DataTable();
            //      ht_Order_History.Add("@Trans", "INSERT");
            //      ht_Order_History.Add("@Order_Id", int.Parse(grd_order.Rows[e.RowIndex].Cells[12].Value.ToString()));
            //      //  ht_Order_History.Add("@User_Id", int.Parse(ddl_UserName.SelectedValue.ToString()));
            //      //ht_Order_History.Add("@Status_Id", int.Parse(ddl_Order_Status_Reallocate.SelectedValue.ToString()));
            //      //ht_Order_History.Add("@Progress_Id", 8);
            //      ht_Order_History.Add("@Assigned_By", userid);
            //      ht_Order_History.Add("@Modification_Type", "Order Delete");
            //      dt_Order_History = dataaccess.ExecuteSP("Sp_Order_History", ht_Order_History);

            //      BindGrid();
            //      GridviewbindOrderdata();
            //  }
            //}
        }
示例#12
0
        private void grd_Admin_orders_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex != -1)
            {
                if (e.ColumnIndex == 4)
                {
                    form_loader.Start_progres();
                    //cProbar.startProgress();

                    Ordermanagement_01.Order_Entry OrderEntry = new Ordermanagement_01.Order_Entry(int.Parse(grd_Admin_orders.Rows[e.RowIndex].Cells[10].Value.ToString()), userid, User_Role_Id, "");
                    OrderEntry.Show();
                    //cProbar.stopProgress();
                }

                if (e.ColumnIndex == 1)
                {
                    //int checkBoxCounter = 0;
                    // DataGridViewCheckBoxCell cellCheck = (bool)(DataGridViewCheckBoxCell)grd_Admin_orders[e.ColumnIndex, e.RowIndex].FormattedValue.ToString();

                    //bool cellCheck = (bool)grd_Admin_orders[e.ColumnIndex, e.RowIndex].FormattedValue;
                    //if (cellCheck != null)
                    //{
                    //    if ((bool)cellCheck == true)
                    //    {
                    //        checkBoxCounter++;
                    //    }
                    //    else
                    //    {
                    //        checkBoxCounter--;
                    //    }
                    //}
                    //if (checkBoxCounter == grd_Admin_orders.Rows.Count - 1)
                    //{
                    //    chk_All.Checked = false;
                    //}
                    //else if (checkBoxCounter != grd_Admin_orders.Rows.Count - 1)
                    //{
                    //    chk_All.Checked = true;
                    //}

                    //
                    //for (int i = 0; i < grd_Admin_orders.Rows.Count; i++)
                    //{

                    //    if (Convert.ToBoolean(grd_Admin_orders.Rows[i].Cells[1].EditedFormattedValue) == false)
                    //    {
                    //        //Paste your code here
                    //        checkBoxCounter = 1;
                    //        break;
                    //    }
                    //    else
                    //    {
                    //        checkBoxCounter = 0;
                    //    }
                    //}
                    //if (checkBoxCounter == 1)
                    //{

                    //    chk_All.Checked = true;
                    //}
                    //else
                    //{
                    //    chk_All.Checked = false;
                    //}
                }
            }
        }