protected void save_comments() { if (mygridcomm_.Rows.Count <= 0) { return; } BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + lblprj.Text; _clscmscomment _objcls = new _clscmscomment(); for (int i = 0; i <= mygridcomm_.Rows.Count - 1; i++) { _objcls.com_date = DateTime.Now; _objcls.comment = mygridcomm_.Rows[i].Cells[2].Text; _objcls.doc_id = Convert.ToInt32(lblid.Text); _objcls.uid = (string)Session["uid"]; _objcls.project = lblprj.Text; _objcls.module = "PROGRAMS"; _objcls.sec = mygridcomm_.Rows[i].Cells[1].Text; _objcls.page = "0"; _objbll.Add_CMS_Comments(_objcls, _objdb); } ScriptManager.RegisterStartupScript(this, typeof(string), "", "alert('Comment Saved!');", true); //Response.Redirect("CMS/CMS.aspx?PRJ=" + lblprj.Text); Response.Redirect("CMS/CMS.aspx?PRJ=PV"); load_comments(); mygridcomm_.DataSource = ""; mygridcomm_.DataBind(); }
private void Save_Comments() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + lblprjid.Text; _clscmscomment _objcls = new _clscmscomment(); bool _cmt = false; for (int i = 0; i <= mybasket.Rows.Count - 1; i++) { _objcls.com_date = DateTime.Now; _objcls.comment = mybasket.Rows[i].Cells[2].Text; _objcls.doc_id = Convert.ToInt32((lblid.Text)); _objcls.uid = (string)Session["uid"]; _objcls.project = lblprjid.Text; _objcls.module = lblvmode.Text; _objcls.sec = mybasket.Rows[i].Cells[1].Text; _objcls.page = mybasket.Rows[i].Cells[0].Text; _objbll.Add_CMS_Comments(_objcls, _objdb); _cmt = true; } if (_cmt == true) { Send_Email(); } }
void Save_Comments() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "dbCML"; _clscmscomment _objcls = new _clscmscomment(); for (int i = 0; i <= mybasket.Rows.Count - 1; i++) { _objcls.com_date = DateTime.Now; _objcls.comment = mybasket.Rows[i].Cells[2].Text; _objcls.project = (string)Session["project"]; _objcls.module = "COMMISSIONING PLANS"; _objcls.uid = (string)Session["uid"]; _objcls.doc_id = Convert.ToInt32(mygrid.Rows[0].Cells[4].Text); _objbll.Add_CMS_Comments(_objcls, _objdb); } ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('Comment(s) Saved');", true); }