private void sys_dtgrd_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            SupplierSystemModel m = new SupplierSystemModel();

            if (e.ColumnIndex > -1 && e.RowIndex > -1 && e.RowIndex < sys_dtgrd.RowCount - 1)
            {
                m.id         = sys_dtgrd.Rows[e.RowIndex].Cells[0].Value;
                m.name       = sys_dtgrd.Rows[e.RowIndex].Cells[1].Value;
                m.properties = sys_dtgrd.Rows[e.RowIndex].Cells[2].Value;
                m.startdate  = sys_dtgrd.Rows[e.RowIndex].Cells[3].Value;
                m.enddate    = sys_dtgrd.Rows[e.RowIndex].Cells[4].Value;
                m.piece      = sys_dtgrd.Rows[e.RowIndex].Cells[5].Value;
                m.isinvoice  = sys_dtgrd.Rows[e.RowIndex].Cells[6].Value;
                m.price      = sys_dtgrd.Rows[e.RowIndex].Cells[7].Value;
                m.agncyprice = sys_dtgrd.Rows[e.RowIndex].Cells[8].Value;
                m.personid   = sys_dtgrd.Rows[e.RowIndex].Cells[9].Value;
                m.suppid     = sys_dtgrd.Rows[e.RowIndex].Cells[10].Value;
                m.logid      = sys_dtgrd.Rows[e.RowIndex].Cells[11].Value;
                SupplierSystemController controller = new SupplierSystemController(new SupplierView(this), m);
                controller.setCellClicked();
                List <string> tags = new List <string>();
                tags.Add("name");
                tags.Add("prop");
                tags.Add("prsn");
                tags.Add("prc");
                tags.Add("log");
                controller.setlabelText(tags);
            }
            else
            {
            }
        }
 public List <SupplierSystemModel> searchSuppSystm()
 {
     try
     {
         List <SupplierSystemModel> tlst = new List <SupplierSystemModel>();
         comm.Connection.Open();
         //ınnser joın olacaks
         comm.CommandText = "SELECT * FROM " + SqlDataHelper.TableName + "WHERE isinadi like '%" + m.name + "%'" +
                            " order by isinadi ";
         SqlDataReader reader = comm.ExecuteReader();
         while (reader.Read())
         {
             SupplierSystemModel t = new SupplierSystemModel();
             t.id         = reader["id"];
             t.name       = reader["isinadi"];
             t.startdate  = reader["bsltrh"];
             t.enddate    = reader["btstrh"];
             t.piece      = reader["isadt"];
             t.properties = reader["özlkler"];
             t.personid   = reader["isksid"];
             t.suppid     = reader["tdrkciid"];
             t.isinvoice  = reader["faturaksldmi"];
             t.agncyprice = reader["ajnsfiyat"];
             t.price      = reader["fiyat"];
             t.logid      = reader["üyelogid"];
             tlst.Add(t);
         }
         reader.Close();
         return(tlst);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         comm.Connection.Close();
     }
     return(null);
 }
 public SupplierSystemModel getSuppSystm()
 {
     try
     {
         SupplierSystemModel t = new SupplierSystemModel();
         comm.Connection.Open();
         //ınnser joın olacaks
         comm.CommandText = "SELECT * FROM " + SqlDataHelper.TableName + "WHERE id=@id";
         comm.Parameters.AddWithValue("@id", m.id);
         SqlDataReader reader = comm.ExecuteReader();
         while (reader.Read())
         {
             t.id         = reader["id"];
             t.name       = reader["isinadi"];
             t.startdate  = reader["bsltrh"];
             t.enddate    = reader["btstrh"];
             t.piece      = reader["isadt"];
             t.properties = reader["özlkler"];
             t.personid   = reader["isksid"];
             t.suppid     = reader["tdrkciid"];
             t.isinvoice  = reader["faturaksldmi"];
             t.agncyprice = reader["ajnsfiyat"];
             t.price      = reader["fiyat"];
             t.logid      = reader["üyelogid"];
         }
         reader.Close();
         return(t);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         comm.Connection.Close();
     }
     return(null);
 }
 public void setCurrentSuppSysModel(SupplierSystemModel m)
 {
     throw new NotImplementedException();
 }
 public void setCellClicked(SupplierSystemModel s)
 {
     supp = s;
 }
 public void setCurrentSuppSysModel(SupplierSystemModel m)
 {
     v.setCurrentSuppSysModel(m);
 }