private void update() { try { using (SmoothEnterprise.Database.DataSet rs = new SmoothEnterprise.Database.DataSet(SmoothEnterprise.Database.DataSetType.OpenUpdate)) { string sql = string.Format(" select * from eipe.dbo.Leica_Standard where rowid='{0}' ", _rowid); rs.Open(sql); if (!rs.EOF) { rs["value"] = _value; rs["modify_user"] = CurrentUser.LogonID; rs["modify_date"] = DateTime.Now.ToString(); rs.Update(); rs.Close(); ClientScript.RegisterStartupScript(ClientScript.GetType(), "java_script", "<script> Success('" + _sandard_id + "') </script>"); } } } catch (Exception ex) { Utility.log(0, ex.Message, ex.StackTrace); } }
protected void Btn_Del_Click(object sender, EventArgs e) { try { if (!string.IsNullOrEmpty(del_item.Value)) { DBTransfer exec = new DBTransfer(); string[] dels = del_item.Value.Split(','); foreach (string item in dels) { exec.RunIUSql(" delete eipe.dbo.Leica_Standard where rowid='" + item + "' "); } msg.Value = "刪除成功"; } else { msg.Value = "請選擇刪除項目"; } } catch (Exception ex) { Utility.log(0, ex.Message, ex.Source); } }