protected void Possition_MsSystems() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + (string)Session["project"]; _clscmsdocument _objcls = new _clscmsdocument(); _objcls.mssys_id = Convert.ToInt32((string)Session["folder_id"]); _objcls.mssys_name = txtfolder.Text; _objcls.srv_id = Convert.ToInt32((string)Session["svr_id"]); if (txtfolder.Text.Length <= 0) { txtfolder.Text = "0"; } _objcls.pos = Convert.ToInt32(txtfolder.Text); _objcls.action = 4; if ((string)Session["project"] == "HMIM") { _objcls.Build1 = chkharam.Checked; _objcls.Build2 = chkservice.Checked; _objcls.Build3 = chkcuc.Checked; _objbll.Manage_MsFolder_Div(_objcls, _objdb); } else { _objbll.Manage_MsFolder(_objcls, _objdb); } ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('Folder Updated');", true); }
void Send_ReMail() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _clsuser _objcls = new _clsuser(); _objdb.DBName = "DBCML"; _objcls.project_code = lblprjcode.Text; string ProjectName = _objbll.Get_ProjectName(_objcls, _objdb); _objdb.DBName = "DB_" + lblprjcode.Text; _clscmsdocument _objcls1 = new _clscmsdocument(); _objcls1.doc_name = "Document Review"; int _period = _objbll.Get_ReviewPeriod(_objcls1, _objdb); publicCls.publicCls _obj = new publicCls.publicCls(); string _Link = "https://cmltechniques.com/Default.aspx?Id=1P_" + lblprjcode.Text + "M_DR"; string Body = ""; Body = "Ref. " + ProjectName + "/" + lbpkg.Text + "/" + lbldrno.Text + "/" + lbdoc.Text + "\n\n" + "This is an automatically generated email to advise you that the above document has been issued to you." + "\n\n" + "Could you please find time to review the documents and make comments within the next " + _period + " days" + "\n\n" + "If you review and have no comments on the document, please confirm with 'No comments' in the Response Column." + "\n\n\n" + "Using the link below will direct to the " + ProjectName + " Document Review Page,upon login to CML Techniques." + "\n\n" + "Document Link :" + _Link + "\n\n\n" + "Thank you in anticipation of your co-operation with the review process." + "\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "http://www.cmldubai.com"; string _sub = "Document Review - Ref. " + ProjectName + "/" + lbpkg.Text + "/" + lbldrno.Text + "/" + lbdoc.Text; _obj.Send_Email(drissuedto.SelectedItem.Text, _sub, Body); //_objcls.Send_Email("*****@*****.**", _sub, Body); }
private void uploadFiles() { HttpFileCollection hfc = Request.Files; BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + lblprj.Text; _clscmsdocument _objcls = new _clscmsdocument(); string _dir = lblprj.Text; bool _exist = false; if (Directory.Exists(Server.MapPath("CMS_DOCS") + "\\" + _dir) == false) { Directory.CreateDirectory(Server.MapPath("CMS_DOCS") + "\\" + _dir); } for (int i = 0; i < hfc.Count; i++) { HttpPostedFile hpf = hfc[i]; string _fileName = System.IO.Path.GetFileName(hpf.FileName); if (ChekSpecialCharacter(_fileName) == true) { return; } //FileInfo _Ffile = new FileInfo(Server.MapPath("CMS_DOCS\\" + _dir) + "\\" + System.IO.Path.GetFileName(hpf.FileName)); //if (_Ffile.Exists == true) // _Ffile.Delete(); if (hpf.ContentLength > 0) { hpf.SaveAs(Server.MapPath("CMS_DOCS") + "\\" + _dir + "\\" + System.IO.Path.GetFileName(hpf.FileName)); //hpf.SaveAs("http://www.cmltechniques.com\\CmsDocs\\" + System.IO.Path.GetFileName(hpf.FileName)); } _objcls.doc_name = txtdoc_name.Text; _objcls.file_name = System.IO.Path.GetFileName(hpf.FileName); _objcls.module_name = (string)Session["mod_name"]; _objcls.uid = (string)Session["uid"]; _objcls.project_code = lblprj.Text; _objcls.upload_date = DateTime.Now; _objcls.folder = Convert.ToInt32(Session["Fold_cms"]);//Convert.ToInt32(lbldiv.Text); _objcls.module = Convert.ToInt32(lblM_id_cms.Text); _objcls.reff_no = lblreff_no.Text; //_objcls.srv_id = Convert.ToInt32((string)Session["ser_name"]); _objcls.srv_id = Convert.ToInt32(ViewState["ServiceID"]); _objcls.Type = "Public"; _objcls.Comment_By = Convert.ToInt32(dr_responseBy.SelectedItem.Value); _objcls.doc_status = dr_status.SelectedItem.Text; _objbll.Add_CMS_Document(_objcls, _objdb); Set_CommentsBy(); _exist = true; //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('Documents Uploaded!');", true); } } //if (chk.Checked == false) // Send_Email(); if (chk.Checked == false && _exist == true) { btnDummy_ModalPopupExtender2.Show(); } txtdoc_name.Text = ""; }
private void uploadFiles() { HttpFileCollection hfc = Request.Files; BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + lblprj.Text; _clscmsdocument _objcls = new _clscmsdocument(); string _dir = lblprj.Text; if (Directory.Exists(Server.MapPath("../CMS_DOCS") + "\\" + _dir) == false) { Directory.CreateDirectory(Server.MapPath("../CMS_DOCS") + "\\" + _dir); } for (int i = 0; i < hfc.Count; i++) { HttpPostedFile hpf = hfc[i]; string _fileName = System.IO.Path.GetFileName(hpf.FileName); if (ChekSpecialCharacter(_fileName) == true) { return; } //FileInfo _Ffile = new FileInfo(Server.MapPath("CMS_DOCS\\" + _dir) + "\\" + System.IO.Path.GetFileName(hpf.FileName)); //if (_Ffile.Exists == true) // _Ffile.Delete(); if (hpf.ContentLength > 0) { hpf.SaveAs(Server.MapPath("../CMS_DOCS") + "\\" + _dir + "\\" + System.IO.Path.GetFileName(hpf.FileName)); //hpf.SaveAs("http://www.cmltechniques.com\\CmsDocs\\" + System.IO.Path.GetFileName(hpf.FileName)); } _objcls.doc_name = txtdoc_name.Text; _objcls.file_name = System.IO.Path.GetFileName(hpf.FileName); _objcls.module_name = lblmod.Text; _objcls.uid = (string)Session["uid"]; _objcls.project_code = lblprj.Text; _objcls.upload_date = DateTime.Now; _objcls.folder = 0; _objcls.module = 0; _objcls.reff_no = lblmod.Text + "/" + lblid.Text; _objcls.srv_id = Convert.ToInt32((string)Session["ser_name"]); _objcls.Type = "Public"; _objcls.Comment_By = 0; _objcls.doc_status = dr_status.SelectedItem.Text; _objbll.Add_CMS_Document(_objcls, _objdb); //Set_CommentsBy(); ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('Documents Uploaded!');", true); } } txtdoc_name.Text = ""; if (lblprj.Text == "HMIM") { Response.Redirect("MonthlyReport.aspx?" + Request.QueryString.ToString()); } }
private string Get_Document() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "db_" + lblprj.Text; _clscmsdocument _objcls = new _clscmsdocument(); _objcls.Doc_Id = Convert.ToInt32(lblid.Text); return(_objbll.Get_Document("GetCableLogFileName", _objcls, _objdb)); }
private void Save() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + (string)Session["project"]; _clscmsdocument _objcls = new _clscmsdocument(); _objcls.doc_name = drdocument.SelectedItem.Text; _objcls.Review_Days = Convert.ToInt32(txtdays.Text); _objbll.Add_ReviewSettings(_objcls, _objdb); ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('Saved!');", true); }
protected void Load_doc_pre() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + lblprj.Text; _clscmsdocument _objcls = new _clscmsdocument(); _objcls.reff_no = (string)Session["reff_no"]; _objcls.project_code = lblprj.Text; _objcls.status = false; rpt_history.DataSource = _objbll.Load_CMS_Document(_objcls, _objdb); rpt_history.DataBind(); }
protected void Load_doc() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + (string)Session["project"]; _clscmsdocument _objcls = new _clscmsdocument(); _objcls.reff_no = (string)Session["reff_no"]; _objcls.project_code = (string)Session["project"]; _objcls.status = true; mygrid.DataSource = _objbll.Load_CMS_Document(_objcls, _objdb); mygrid.DataBind(); }
protected void Load_doc_pre() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + lblprj.Text; _clscmsdocument _objcls = new _clscmsdocument(); _objcls.reff_no = lblmod.Text + "/" + lblid.Text; _objcls.project_code = lblprj.Text; _objcls.status = false; mygrid1.DataSource = _objbll.Load_CMS_Document(_objcls, _objdb); mygrid1.DataBind(); }
protected void Load_doc_pre() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + lblprj.Text; _clscmsdocument _objcls = new _clscmsdocument(); _objcls.reff_no = lblreff_no.Text; _objcls.project_code = lblprj.Text; _objcls.folder = Convert.ToInt32(lbldiv.Text); _objcls.status = false; rpt_history.DataSource = _objbll.Load_CMS_Document_Div(_objcls, _objdb); rpt_history.DataBind(); }
private void Update_Info() { if (DateValidation(txt_sdate.Text) == false) { ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('Invalid submission date!');", true); return; } BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + lblprj.Text; _clscmsdocument _objcls = new _clscmsdocument(); _objcls.msid = Convert.ToInt32(lblmsid.Text); string subdate = null; string revbdate = null; //if (DateValidation(txt_sdate.Text) == true) //{ // subdate = DateTime.ParseExact(txt_sdate.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture).ToString("MM/dd/yyyy", CultureInfo.InvariantCulture); //} _objcls.sbdate = txt_sdate.Text; //if (DateValidation(txt_rdate.Text) == true) //{ // revbdate = DateTime.ParseExact(txt_rdate.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture).ToString("MM/dd/yyyy", CultureInfo.InvariantCulture); //} _objcls.rvdate = txt_rdate.Text; if (drrevcml.SelectedValue == "1") { _objcls.rev_cml = true; } else { _objcls.rev_cml = false; } if (drissuedbhc.SelectedValue == "1") { _objcls.status = true; } else { _objcls.status = false; } _objbll.Update_msinfo(_objcls, _objdb); ModalPopupExtender2.Hide(); }
private void Load_Documents() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + (string)Session["project"]; _clscmsdocument _objcls = new _clscmsdocument(); _objcls.project_code = (string)Session["project"]; _objcls.module_name = "COMMISSIONING PLANS"; mygrid.DataSource = _objbll.Load_CMS_Document(_objcls, _objdb); mygrid.DataBind(); if (mygrid.Rows.Count > 0) { string _path = "/CmsDocs/" + mygrid.Rows[0].Cells[1].Text; myframe.Attributes.Add("src", _path); } }
private void Set_CommentsBy() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + (string)Session["project"]; _clscmsdocument _objcls = new _clscmsdocument(); _objcls.Doc_Id = 0; for (int i = 0; i <= chk_company.Items.Count - 1; i++) { if (chk_company.Items[i].Selected == true) { _objcls.Comment_By = Convert.ToInt32(chk_company.Items[i].Value); _objbll.CMSDoc_Permission(_objcls, _objdb); } } }
private void Get_MSInfo() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + lblprj.Text; _clscmsdocument _objcls = new _clscmsdocument(); _objcls.reff_no = (string)Session["reff_no"]; DataTable _dt = _objbll.Get_MsInfo(_objcls, _objdb); if (_dt.Rows.Count <= 0) { return; } drrevcml.ClearSelection(); txt_sdate.Text = _dt.Rows[0][0].ToString(); drrevcml.Items.FindByText(_dt.Rows[0][1].ToString()).Selected = true; lblinfo.Text = "Planned Submission Date : " + _dt.Rows[0][0].ToString() + " - Reviewed by CML : " + _dt.Rows[0][1].ToString(); }
protected void Load_doc(string Project) { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + Project; _clscmsdocument _objcls = new _clscmsdocument(); _objcls.reff_no = (string)Session["reff_no"]; _objcls.project_code = Project; _objcls.status = true; //mygrid.DataSource = _objbll.Load_CMS_Document(_objcls, _objdb); //mygrid.DataBind(); rpt_latest.DataSource = _objbll.Load_CMS_Document(_objcls, _objdb); rpt_latest.DataBind(); _objcls.status = false; //myhistory.DataSource = _objbll.Load_CMS_Document(_objcls, _objdb); //myhistory.DataBind(); rpt_history.DataSource = _objbll.Load_CMS_Document(_objcls, _objdb); rpt_history.DataBind(); }
void Send_Mail() { BLL_Dml _objbll = new BLL_Dml(); _database _objdb = new _database(); _objdb.DBName = "DB_" + lblprj.Text; _clscmsdocument _objcls1 = new _clscmsdocument(); _objcls1.doc_name = "Site Observation"; int _period = _objbll.Get_ReviewPeriod(_objcls1, _objdb); publicCls.publicCls _objcls = new publicCls.publicCls(); string _Link = "https://cmltechniques.com/Default.aspx?Id=1P_" + lblprj.Text + "M_SO"; string Body = ""; Body = "Ref. " + (string)Session["projectname"] + "/" + (string)Session["service"] + "/" + (string)Session["sono"] + "/" + (string)Session["doc"] + "\n\n" + "This is an automatically generated email to advise you that the above document has been issued to you." + "\n\n" + "Could you please find time to review the documents and make comments within the next " + _period + " days" + "\n\n" + "If you review and have no comments on the document, please confirm with 'No comments' in the Response Column." + "\n\n\n" + "Document Link :" + _Link + "\n\n\n" + "Thank you in anticipation of your co-operation with the review process." + "\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "https://cmltechniques.com"; string _sub = "Site Observation - Ref. " + (string)Session["projectname"] + "/" + (string)Session["service"] + "/" + (string)Session["sono"] + "/" + (string)Session["doc"]; _clsuser _clsusr = new _clsuser(); _objdb.DBName = "DBCML"; _clsusr.uid = (string)Session["issued"]; _clsusr.project_code = lblprj.Text; if (_objbll.GetEmailNotify(_clsusr, _objdb) == true) { _objcls.Send_Email((string)Session["issued"], _sub, Body); } // _objcls.Send_Email("*****@*****.**", _sub, Body); Body = "Ref. " + (string)Session["projectname"] + "/" + (string)Session["service"] + "/" + (string)Session["sono"] + "/" + (string)Session["doc"] + "\n\n" + "This is an automatically generated email to advise you that the above document has been issued to " + (string)Session["issued"] + "\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "Document Link :" + _Link + "\n\n\n" + "https://cmltechniques.com"; for (int i = 0; i <= chkuser.Items.Count - 1; i++) { if (chkuser.Items[i].Selected == true) { _objcls.Send_Email(chkuser.Items[i].Text, _sub, Body); } } // _objcls.Send_Email("*****@*****.**", _sub, Body); }