private void tsb_EditDis_Click(object sender, EventArgs e) { ConnectionStringSettings conSettings = ConfigurationManager.ConnectionStrings["ApplicationDatabase"]; string ConnectionStrings = conSettings.ConnectionString; try { conn = new SqlConnection(ConnectionStrings); conn.Open(); cmd = new SqlCommand("UPDATE CommiteeReq SET "+ "DocDT =" + txt_DocDate.Text + "ProjKey =" + txt_ProjKey.Text + "ProjCode =" + txt_ProjCode.Text + "ProjAlias =" + txt_ProjAlias.Text + "ProjName =" + txt_ProjName.Text + "ContractID =" + txt_ContractID.Text + "ContractDate =" + txt_ContractDate.Text + "CustomerKey =" + txt_CustomerKey.Text + "CustomerName =" + txt_CustomerName.Text + "ContractAmt =" + txt_ContractAmt.Text + "ContractVat =" + txt_ContractVat.Text + "ContractTax =" + txt_ContractTax.Text + "ContractTaxPercent =" + txt_ContractTaxPer.Text + "ReqNote =" + txt_ReqNote.Text + "ReqValue =" + txt_ReqVal.Text + "ReqValuePercent =" + txt_ReqValPer.Text + "NetReqValue =" + txt_NetReqVal.Text + "DiscNote =" + txt_DiscNote.Text + "DiscValue =" + txt_DiscValue.Text + "NetTotal =" + txt_NetTotal.Text + "Note =" + txt_Note.Text + "WHERE CommiteeReqKey =" + txt_CommitReqKey.Text, conn); int x = cmd.ExecuteNonQuery(); if (x == 1) { MessageBox.Show("ปรับปรุงข้อมูลใช่หรือไม่","ยืนยันการแก้ไขข้อมูล",MessageBoxButtons.OK); } ClearForm(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { conn.Close(); } Datagridview_DGV_Dis(); }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง