Пример #1
0
        private void Send_Notification()
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

            _objdb.DBName = "dbCML";
            _clsuser _objusr = new _clsuser();

            _objusr.project_code = (string)Session["project"];
            string project = _objbll.Get_ProjectName(_objusr, _objdb);

            publicCls.publicCls _obj     = new publicCls.publicCls();
            _clsdocument        _objcls1 = new _clsdocument();

            _objcls1.project_code = (string)Session["project"];
            _objcls1.schid        = Convert.ToInt32(lblsrv.Text);
            DataTable _dt  = _objbll.load_dms_user_email(_objcls1, _objdb);
            string    Body = "To: CML Techniques Project Managers," + "\n\n" + "Ref. " + project + "/" + drpackage.SelectedItem.Text + "/" + fname.Text + "\n\n" + "This is a notification to inform you that " + (string)Session["uid"] + " has responded to comments previously made on the above O and M Manual." + "\n" + "\n\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "https://cmltechniques.com";
            string    _sub = "Ref. " + project + " / " + drpackage.SelectedItem.Text + "/" + fname.Text;
            var       list = from o in _dt.AsEnumerable()
                             where o.Field <string>(1) == "Review/Comment" || o.Field <string>(1) == "Review/Comment/Status"
                             select o;

            foreach (var row in list)
            {
                _obj.Send_Email(row[0].ToString(), _sub, Body);
            }
        }
Пример #2
0
        void Send_Mail()
        {
            if (lblprjcode.Text == "OPH" || lblprjcode.Text == "PCD")
            {
                return;
            }
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

            _objdb.DBName = "DBCML";
            _clsuser _objcls1 = new _clsuser();

            _objcls1.project_code = lblprjcode.Text;
            string _prj = _objbll.Get_ProjectName(_objcls1, _objdb);

            publicCls.publicCls _objcls = new publicCls.publicCls();
            string Body = "";

            Body = "Ref. " + _prj + "/" + lbpkg.Text + "/" + lbldrno.Text + "\n\n" + "This is an automatically generated email to inform you that " + lbissued.Text + " responded the above document" + "\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 = "Document Review Response - Ref. " + _prj + "/" + lbpkg.Text + "/" + lbldrno.Text;

            _objcls.Send_Email(lbluid.Text, _sub, Body);
            //_objcls.Send_Email("*****@*****.**", _sub, Body);
        }
Пример #3
0
        protected void Send_Password_toUser()
        {
            //string _Message="Dear Sir," + "\n" + "Your user account for CML Interactive has been created." +"\n\n" + "LOGIN INFORMATION:" + "\n" + "User Name :" + userid.Text + "\n" + "Password :"******"Autopassword"];
            string _Message = "";

            //if (chkmodule1.Items[0].Selected == true && chkmodule1.Items[1].Selected == false)
            //{
            //    _Message = "This email has been sent to you from CML Techniques" + "\n\n" + "It is an automatic message that is generated directly from our CML interactive online documentation system." + "\n\n" + "You now have access to the " + "" + " online documents." + "\n\n\n" + "User Name : " + txtuid.Text + "\n" + "Password : "******"Autopassword"] + "\n\n\n" + "Please follow the link below to login : "******"\n" + "https://cmltechniques.com" + "\n\n\n" + "if you encounter any problems then email our system administrator at [email protected]" + "\n\n" + "Kind regards," + "\n" + "CML Techniques";
            //}
            //else if (chkmodule1.Items[0].Selected == false && chkmodule1.Items[1].Selected == true)
            //{
            _Message = "This email has been sent to you from CML Techniques" + "\n\n" + "It is an automatic message that is generated directly from our CML interactive online documentation system." + "\n\n" + "You now have access to the " + "" + " online documents." + "\n\n\n" + "User Name : " + txtuid.Text + "\n" + "Password : "******"Autopassword"] + "\n\n\n" + "Please follow the link below to login : "******"\n" + "https://dms.cmltechniques.com" + "\n\n\n" + "if you encounter any problems then email our system administrator at [email protected]" + "\n\n" + "Kind regards," + "\n" + "CML Techniques";
            //}
            //else
            //{
            //    _Message = "This email has been sent to you from CML Techniques" + "\n\n" + "It is an automatic message that is generated directly from our CML interactive online documentation system." + "\n\n" + "You now have access to the " + "" + " online documents." + "\n\n\n" + "User Name : " + txtuid.Text + "\n" + "Password : "******"Autopassword"] + "\n\n\n" + "Please follow the link below to login : "******"\n" + "CMS Access : https://dms.cmltechniques.com, DMS Access : https://dms.cmltechniques.com" + "\n\n\n" + "if you encounter any problems then email our system administrator at [email protected]" + "\n\n" + "Kind regards," + "\n" + "CML Techniques";
            //}
            if ((chkmodule.Items[0].Selected == true) && (chkmodule.Items[1].Selected == true))
            {
                _Message = "This email has been sent to you from CML Techniques" + "\n\n" + "It is an automatic message that is generated directly from our CML interactive online documentation system." + "\n\n" + "You now have access to the " + "" + " online documents." + "\n\n\n" + "User Name : " + txtuid.Text + "\n" + "Password : "******"Autopassword"] + "\n\n\n" + "Please follow the link below to login : "******"\n" + "CMS Access : https://cmltechniques.com, DMS Access : https://dms.cmltechniques.com" + "\n\n\n" + "if you encounter any problems then email our system administrator at [email protected]" + "\n\n" + "Kind regards," + "\n" + "CML Techniques";
            }
            else if (chkmodule.Items[1].Selected == true)
            {
                _Message = "This email has been sent to you from CML Techniques" + "\n\n" + "It is an automatic message that is generated directly from our CML interactive online documentation system." + "\n\n" + "You now have access to the " + "" + " online documents." + "\n\n\n" + "User Name : " + txtuid.Text + "\n" + "Password : "******"Autopassword"] + "\n\n\n" + "Please follow the link below to login : "******"\n" + "https://dms.cmltechniques.com" + "\n\n\n" + "if you encounter any problems then email our system administrator at [email protected]" + "\n\n" + "Kind regards," + "\n" + "CML Techniques";
            }
            else
            {
                _Message = "This email has been sent to you from CML Techniques" + "\n\n" + "It is an automatic message that is generated directly from our CML interactive online documentation system." + "\n\n" + "You now have access to the " + "" + " online documents." + "\n\n\n" + "User Name : " + txtuid.Text + "\n" + "Password : "******"Autopassword"] + "\n\n\n" + "Please follow the link below to login : "******"\n" + "https://cmltechniques.com" + "\n\n\n" + "if you encounter any problems then email our system administrator at [email protected]" + "\n\n" + "Kind regards," + "\n" + "CML Techniques";
            }

            publicCls.publicCls _objcls = new publicCls.publicCls();
            _objcls.Send_Email(txtuid.Text, "CML Techniques User Access..", _Message);
        }
        void Send_Mail()
        {
            publicCls.publicCls _objcls = new publicCls.publicCls();
            string Body = "";

            Body = "Ref. " + (string)Session["projectname"] + "/" + drservice.SelectedItem.Text + "/" + txt_drno.Text + "/" + txt_subject.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 15 days" + "\n\n" + "If you review and have no comments on the document, please confirm with 'No comments' in the Response Column." + "\n\n" + "Thank you in anticipation of your co-operation with the review process." + "\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "http://www.cmltechniques.com";

            string _sub = "Document Review - Ref. " + (string)Session["projectname"] + "/" + drservice.SelectedItem.Text + "/" + txt_drno.Text + "/" + txt_subject.Text;

            if (IsValidEmailAddress(txt_issuedto.Text))
            {
                _objcls.Send_Email(txt_issuedto.Text, _sub, Body);
            }

            Body = "Ref. " + (string)Session["projectname"] + "/" + drservice.SelectedItem.Text + "/" + txt_drno.Text + "/" + "/" + txt_subject.Text + "\n\n" + "This is an automatically generated email to advise you that the above document has been issued to " + txt_review.Text + "\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "http://www.cmltechniques.com";

            foreach (ListItem _lst in chkprjusers.Items)
            {
                if (_lst.Selected == true)
                {
                    string _email = _lst.Text;
                    _objcls.Send_Email(_email, _sub, Body);
                }
            }
        }
Пример #5
0
        void Send_Admin(string project)
        {
            //publicCls.publicCls _objcls = new publicCls.publicCls();
            string Body = "To: CML Techniques Project Managers," + "\n\n" + "Ref. " + (string)Session["projectname"] + " - " + ((string)Session["cfile"]).Substring(0, ((string)Session["cfile"]).Length - 3) + "\n\n" + "A comment(s) has been made on the above manual by " + (string)Session["uid"] + "\n" + "Please consider the comment(s) and revise the O & M appropriate." + "\n\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "https://cmltechniques.com";
            string _sub = "Ref. " + project + " - " + ((string)Session["cfile"]).Substring(0, ((string)Session["cfile"]).Length - 3);

            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

            _objdb.DBName = "dbCML";
            _clsuser _objusr = new _clsuser();

            _objusr.project_code = (string)Session["project"];
            publicCls.publicCls _obj     = new publicCls.publicCls();
            _clsdocument        _objcls1 = new _clsdocument();

            _objcls1.project_code = (string)Session["project"];
            _objcls1.schid        = Convert.ToInt32(lblsrv.Text);
            DataTable _dt  = _objbll.load_dms_user_email(_objcls1, _objdb);
            var       list = from o in _dt.AsEnumerable()
                             where o.Field <string>(1) == "Review/Comment" || o.Field <string>(1) == "Review/Comment/Status"
                             select o;

            foreach (var row in list)
            {
                _obj.Send_Email(row[0].ToString(), _sub, Body);
            }
            // _obj.Send_Email("*****@*****.**", _sub, Body);
        }
        protected void Send_Email()
        {
            BLL_Dml   _oblbll = new BLL_Dml();
            _database _objdb  = new _database();

            _objdb.DBName = "dbCML";
            _clsuser _objcls = new _clsuser();

            _objcls.project_code = lblprj.Text;
            string    ProjectName = _oblbll.Get_ProjectName(_objcls, _objdb);
            DataTable _dtable;
            string    Body  = "";
            string    _Link = "";
            string    _lnk  = "";

            publicCls.publicCls _obj = new publicCls.publicCls();
            string _sub = "Ref. " + ProjectName + "/" + (string)Session["mod_name"] + "/" + txtdoc_name.Text;

            Body         = "Ref. " + ProjectName + " > " + (string)Session["F_na_cms"] + " > " + txtdoc_name.Text + "\n\n" + "This is an automatically generated email to advise you that the " + (string)Session["mod_name"] + "  document noted above has been uploaded to CML Techniques " + ProjectName + " and is available for review." + "\n\n" + "Could you please find time to review the document and make any comments using the document review page of the " + (string)Session["mod_name"] + "." + "\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";
            _objcls.mode = 3;
            _dtable      = _oblbll.Load_CMS_Users(_objcls, _objdb);
            var _result = from o in _dtable.AsEnumerable()
                          select o;

            foreach (var _uid in _result)
            {
                _obj.Send_Email(_uid[0].ToString(), _sub, Body);
            }
        }
Пример #7
0
        private void SetAuthorizedControls()
        {
            tblAdd.Visible = (lblaccess.Text == "ADMIN GROUP" || lblaccess.Text == "SYS.ADMIN GROUP");
            //lblNewProject.Text = (lblprj.Text == "HMIM" || lblprj.Text == "HMHS" || lblprj.Text == "AZC" ||  lblprj.Text == "123" || lblprj.Text == "demo") ? "1" : "0";
            //bool isNewProject = (lblNewProject.Text == "0") ? false : true;

            tdCloseDateHeader.Visible = isNewProject;
            tdCloseDateFilter.Visible = isNewProject;
            tdBuildingHeader.Visible  = isNewProject;
            tdBuildingFilter.Visible  = isNewProject;
            tdEditSOHeader.Visible    = tblAdd.Visible;
            tdEditSOFilter.Visible    = tblAdd.Visible;
            grdSOLog.MasterTableView.GetColumn("Closeout_Date").Visible = isNewProject;
            grdSOLog.MasterTableView.GetColumn("Building").Visible      = isNewProject;
            grdSOLog.MasterTableView.GetColumn("so_id").Visible         = tblAdd.Visible;
            trcdate.Visible        = isNewProject;
            trBuildingEdit.Visible = isNewProject;
            tdBuildingAdd.Visible  = isNewProject;

            if (lblprj.Text == "ABS" && ((string)Session["group"] != "ADMIN GROUP" && (string)Session["group"] != "SYS.ADMIN GROUP"))
            {
                publicCls.publicCls _obj = new publicCls.publicCls();
                tblAdd.Visible = _obj.Load_User_Module_Permission(lblprj.Text, (string)Session["uid"], 7);
            }
        }
Пример #8
0
        void SendRem(string _period, string _days, string project, string package, string rem, int _srv)
        {
            string    Body    = "Ref. " + project + " - " + package + "\n\n" + "This is an automatically generated email to remind you that the O & M noted above has been available for the last " + _period + " days. There is now only " + _days + " days left within the review period." + "\n\n" + "Could you please find time to review the manual and make any comments using the comment screen within the next " + _days + " days." + "\n\n" + "If you have reviewed and have no comments on the manual, please confirm with 'No comments' on exit from the website." + "\n\n" + "Thank you in anticipation of co-operation." + "\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "http://www.cmldubai.com";
            string    _sub    = "Ref. " + project + " - " + package + " " + rem;
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

            _objdb.DBName = "dbCML";
            _clsuser _objcls = new _clsuser();

            _objcls.project_code = (string)Session["project"];
            publicCls.publicCls _obj  = new publicCls.publicCls();
            DataTable           _user = _objbll.load_User(_objcls, _objdb);
            var list = from o in _user.AsEnumerable()
                       where o.Field <string>(2) == "Review/Comment" || o.Field <string>(2) == "Review/Comment/Status"
                       select o;

            foreach (var row in list)
            {
                //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" + row[0].ToString() + "');", true);
                _objcls.uid = row[0].ToString();
                DataTable _usersrv = _objbll.load_usersrv(_objcls, _objdb);
                var       serv     = from o in _usersrv.AsEnumerable()
                                     where o.Field <int>(0) == _srv
                                     select o;
                foreach (var row1 in serv)
                {
                    _obj.Send_Email(row[0].ToString(), _sub, Body);
                    //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" + row[0].ToString() + "');", true);
                }
                //_obj.Send_Email("*****@*****.**", _sub, Body);
            }
            _obj.Send_Email("*****@*****.**", _sub, Body);
        }
Пример #9
0
        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);
        }
Пример #10
0
        void Send_Acknow(string project)
        {
            publicCls.publicCls _objcls = new publicCls.publicCls();
            string Body = "This is an automatically generated email to confirm CML Techniques are in receipt of your comments made for the above manual." + "\n\n" + "The comments will receive attention and the manual will be revised as required." + "\n\n" + "Thank you in anticipation of your co-operation with the review process." + "\n\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "https://cmltechniques.com";
            string _sub = "Ref. " + project + " - " + ((string)Session["cfile"]).Substring(0, ((string)Session["cfile"]).Length - 3);

            _objcls.Send_Email((string)Session["uid"], _sub, Body);
        }
        void Send_Mail(string _pwd)
        {
            publicCls.publicCls _objcls = new publicCls.publicCls();
            string Body = "Your Password is :" + _pwd + "\n\n\n" + "http://www.cmlinternational.net/aspnet/default.aspx";
            string _sub = "Password Recovery";

            _objcls.Send_Email(_uid.Text, _sub, Body);
        }
Пример #12
0
        void Send_Mail(string _pwd)
        {
            publicCls.publicCls _objcls = new publicCls.publicCls();
            string Body = "CML Techniques Access :" + "\n\n\n" + "Your User Id is : " + _uid.Text + "\n" + "Your Password is : " + _pwd + "\n\n\n" + "https://cmltechniques.com";
            string _sub = "CML Techniques Access";

            _objcls.Send_Email(_uid.Text, _sub, Body);
        }
Пример #13
0
        void Send_Password_toUser()
        {
            //string _Message="Dear Sir," + "\n" + "Your user account for CML Interactive has been created." +"\n\n" + "LOGIN INFORMATION:" + "\n" + "User Name :" + userid.Text + "\n" + "Password :"******"Autopassword"];

            string _Message = "This email has been sent to you from CML Techniques" + "\n\n" + "It is an automatic message that is generated directly from our CML interactive online documentation system." + "\n\n" + "You now have access to the " + "" + " online documents." + "\n\n\n" + "User Name : " + userid.Text + "\n" + "Password : "******"Autopassword"] + "\n\n\n" + "Please follow the link below to login : "******"\n" + "http://www.cmldubai.com" + "\n\n\n" + "if you encounter any problems then email our system administrator at [email protected]" + "\n\n" + "Kind regards," + "\n" + "CML Techniques";

            publicCls.publicCls _objcls = new publicCls.publicCls();
            _objcls.Send_Email(userid.Text, "CML Techniques User Access..", _Message);
        }
Пример #14
0
        protected void Send_Email()
        {
            BLL_Dml   _oblbll = new BLL_Dml();
            _database _objdb  = new _database();

            _objdb.DBName = "dbCML";
            _clsuser _objcls = new _clsuser();

            _objcls.project_code = lblprjid.Text;
            DataTable _dtable;
            //string Body = "Ref. " + (string)Session["projectname"] + "/" + lbstatus.Text + "\n\n" + "This is an automatically generated email to advise you that the " + (string)Session["mod_name"] + "  noted above has been uploaded to CML web site and is available for review." + "\n\n" + "Could you please find time to review the document and make any comments using the comment screen." + "\n\n" + "If you review and have no comments on the manual, please confirm with 'No comments' on exit from the website." + "\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 Body = "Ref. " + (string)Session["projectname"] + " - " + lblhead.Text + "/" + lbstatus.Text + "\n\n" + "A comment(s) has been made on the above " + lblhead.Text + " by " + (string)Session["uid"] + "\n\n" + "Please consider the comment(s) and revise the " + lblhead.Text + " appropriate." + "\n\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "https://cmltechniques.com";
            string _sub = "Ref. " + (string)Session["projectname"] + "/" + lblhead.Text + "/" + lbstatus.Text;

            publicCls.publicCls _obj = new publicCls.publicCls();
            if (lblvmode.Text == "MS")
            {
                //_dtable = _oblbll.Load_CMSUsers(_objcls, _objdb);
                //var _result = from o in _dtable.AsEnumerable()
                //              select o;
                //foreach (var _uid in _result)
                //{
                //    _obj.Send_Email(_uid[0].ToString(), _sub, Body);
                //}
                //_clsproject _objprj = new _clsproject();
                //for (int i = 0; i <= chk_company.Items.Count - 1; i++)
                //{
                //    if (chk_company.Items[i].Selected == true)
                //    {
                //        _objprj.com_id = Convert.ToInt32(chk_company.Items[i].Value);
                //        DataTable _dt = _oblbll.Load_UsersCompany(_objprj, _objdb);
                //        var _result = from o in _dt.AsEnumerable()
                //                      select o;
                //        foreach (var _uid in _result)
                //        {
                //            _obj.Send_Email(_uid[0].ToString(), _sub, Body);
                //        }
                //    }
                //}
            }
            else if (lblvmode.Text == "CP")
            {
                _objcls.mode = 2;
                _dtable      = _oblbll.Load_CMS_Users(_objcls, _objdb);
                var _result = from o in _dtable.AsEnumerable()
                              select o;
                foreach (var _uid in _result)
                {
                    //_sub = _uid[0].ToString();
                    //_obj.Send_Email("*****@*****.**", _sub, Body);
                    _obj.Send_Email(_uid[0].ToString(), _sub, Body);
                }
            }
            //_obj.Send_Email("*****@*****.**", _sub, Body);
        }
Пример #15
0
        void Send_Mail(string user_id, string access, string project)
        {
            publicCls.publicCls _objcls = new publicCls.publicCls();
            string Body = "";

            if (access == "Review/Comment")
            {
                Body = "Ref. " + project + " - " + (string)Session["parent"] + "\n\n" + "This is an automatically generated email to advise you that the O & M noted above has been uploaded to CML web site and is available for review." + "\n\n" + "Could you please find time to review the manual and make any comments using the comment screen within the next " + time.Text + " days." + "\n\n" + "If you review and have no comments on the manual, please confirm with 'No comments' on exit from the website." + "\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";
            }
            else if (access == "Review/Comment/Status")
            {
                Body = "Ref. " + project + " - " + (string)Session["parent"] + "\n\n" + "This is an automatically generated email to advise you that the O & M noted above has been uploaded to CML web site and is available for review." + "\n\n" + "Could you please find time to review the manual and make any comments using the comment screen within the next " + time.Text + " days." + "\n\n" + "If you review and have no comments on the manual, please confirm with 'No comments' on exit from the website." + "\n\n" + "Thank you in anticipation of co-operation." + "\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "https://cmltechniques.com";
            }
            string _sub = "Ref. " + project + " - " + (string)Session["parent"];

            _objcls.Send_Email(user_id, _sub, Body);
        }
Пример #16
0
        void Send_Mail_Revised(string user_id, string access, string project)
        {
            publicCls.publicCls _objcls = new publicCls.publicCls();
            string Body = "";

            if (access == "Review/Comment")
            {
                Body = "Ref. " + project + " - " + (string)Session["parent"] + "\n\n" + "This is an automatically generated email to advise you that the O & M noted above has been revised and is now available for further review." + "\n\n" + "Could you please find time to review changes made and make further comment(s) if required." + "\n\n" + "If no further comment(s) are required, please confirm with 'No comments' on exit from the website." + "\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";
            }
            else if (access == "Review/Comment/Status")
            {
                Body = "Ref. " + project + " - " + (string)Session["parent"] + "\n\n" + "This is an automatically generated email to advise you that the O & M noted above has been uploaded to CML web site and is available for review." + "\n\n" + "Could you please find time to review changes and if acceptable change the status of the manual on exit from the website." + "\n\n" + "Thank you in anticipation of co-operation." + "\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "https://cmltechniques.com";
            }
            string _sub = "Ref. " + project + " - " + (string)Session["parent"];

            _objcls.Send_Email(user_id, _sub, Body);
        }
Пример #17
0
        void Send_Mail()
        {
            publicCls.publicCls _objcls = new publicCls.publicCls();
            string Body = "";

            Body = "Ref. " + (string)Session["projectname"] + "/" + drpackage.SelectedItem.Text + "/" + (string)Session["sono"] + "/" + txtdoc.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 15 days" + "\n\n" + "If you review and have no comments on the document, please confirm with 'No comments' in the Response Column." + "\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"] + "/" + drpackage.SelectedItem.Text + "/" + (string)Session["sono"] + "/" + txtdoc.Text;

            _objcls.Send_Email(drissued.SelectedItem.Text, _sub, Body);
            //_objcls.Send_Email("*****@*****.**", _sub, Body);
            Body = "Ref. " + (string)Session["projectname"] + "/" + drpackage.SelectedItem.Text + "/" + (string)Session["sono"] + "/" + txtdoc.Text + "\n\n" + "This is an automatically generated email to advise you that the above document has been issued to " + drissued.SelectedItem.Text + "\n\n" + "CML" + "\n" + "Techniques" + "\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);
        }
Пример #18
0
        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);
        }
Пример #19
0
        void SendCon(string _days, string project, string package, int _id, int _srv)
        {
            string    Body    = "Ref. " + project + " - " + package + "\n\n" + "This is an automatically generated email to confirm that the review period for the above O & M has now lapsed." + "\n\n" + "The O & M remains available to view but the comments window is not available." + "\n\n" + "If you have not reviewed and left any comments, Please contact CML to discuss options that may be available for an extension period to complete the review process." + "\n\n" + "Thank you for your attention and understanding." + "\n\n" + "CML" + "\n" + "Techniques" + "\n\n\n" + "https://cmltechniques.com";
            string    _sub    = "Ref. " + project + " - " + package;
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

            _objdb.DBName = "dbCML";
            _clsuser _objcls = new _clsuser();

            _objcls.project_code = (string)Session["project"];
            publicCls.publicCls _obj  = new publicCls.publicCls();
            DataTable           _user = _objbll.load_User(_objcls, _objdb);
            var list = from o in _user.AsEnumerable()
                       where o.Field <string>(2) == "Review/Comment" || o.Field <string>(2) == "Review/Comment/Status"
                       select o;

            foreach (var row in list)
            {
                //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" + row[0].ToString() + "');", true);
                _objcls.uid = row[0].ToString();
                DataTable _usersrv = _objbll.load_usersrv(_objcls, _objdb);
                var       serv     = from o in _usersrv.AsEnumerable()
                                     where o.Field <int>(0) == _srv
                                     select o;
                foreach (var row1 in serv)
                {
                    _obj.Send_Email(row[0].ToString(), _sub, Body);
                }
                //_obj.Send_Email("*****@*****.**", _sub, Body);
            }
            _clsdocument _objdoc = new _clsdocument();

            _objdoc.doc_id = _id;
            _objdoc.status = "REVISED";
            _objbll.SetDocStatus(_objdoc, _objdb);
            //_obj.Send_Email("*****@*****.**", _sub, Body);
        }
Пример #20
0
        void Send_Mail(string user_id, string project)
        {
            publicCls.publicCls _objcls = new publicCls.publicCls();
            string Body = "";
            string _sub = "";

            if (lbltype.Text == "11")
            {
                Body = "<div style='width:600px'><p style='margin-bottom:20px'><strong>Ref." + project + " - O&M Progress Report Upload</strong></p><p style='margin-bottom:10px'>This is an automatically generated email to advise you that the Latest O&M Progress Report has been uploaded to CML Techniques web site and is available for review.</p><p style='margin-bottom:50px'>Thank you in anticipation of your co-operation with the review process.</p><p style='margin-bottom:5px'>CML Techniques</p><p style='margin:0'><img src='https://cmltechniques.com/images/logo.jpg' width='100' height='50' /></p><p><a href='https://cmltechniques.com/' target='_blank'>www.cmltechniques.com</a></p></div>";
                _sub = "Ref. " + project + " - O&M Progress Report Upload";
            }
            else if (lbltype.Text == "12")
            {
                Body = "<div style='width:600px'><p style='margin-bottom:20px'><strong>Ref." + project + " - Training Mannual Progress Report Upload</strong></p><p style='margin-bottom:10px'>This is an automatically generated email to advise you that the Latest Training Manual Progress Report has been uploaded to CML Techniques web site and is available for review.</p><p style='margin-bottom:50px'>Thank you in anticipation of your co-operation with the review process.</p><p style='margin-bottom:5px'>CML Techniques</p><p style='margin:0'><img src='https://cmltechniques.com/images/logo.jpg' width='100' height='50' /></p><p><a href='https://cmltechniques.com/' target='_blank'>www.cmltechniques.com</a></p></div>";
                _sub = "Ref. " + project + " - Training Manual Progress Report Upload";
            }
            else if (lbltype.Text == "13")
            {
                Body = "<div style='width:600px'><p style='margin-bottom:20px'><strong>Ref." + project + " - Training Schedule Upload</strong></p><p style='margin-bottom:10px'>This is an automatically generated email to advise you that the Latest Training Schedule has been uploaded to CML Techniques web site and is available for review.</p><p style='margin-bottom:50px'>Thank you in anticipation of your co-operation with the review process.</p><p style='margin-bottom:5px'>CML Techniques</p><p style='margin:0'><img src='https://cmltechniques.com/images/logo.jpg' width='100' height='50' /></p><p><a href='https://cmltechniques.com/' target='_blank'>www.cmltechniques.com</a></p></div>";
                _sub = "Ref. " + project + " - Training Schedule Upload";
            }
            _objcls.Send_Email_Html(user_id, _sub, Body);
        }
        private void Populate_Tree1()
        {
            publicCls.publicCls _obj = new publicCls.publicCls();
            _obj.Load_Tree((string)Session["project"], (string)Session["uid"]);
            mytree.Nodes.Clear();
            //BLL_Dml _dtobj = new BLL_Dml();
            //_clsuser  _objcls = new _clsuser ();
            //_objcls.project_code = (string)Session["project"];
            //_objcls.uid = (string)Session["uid"];
            //_dtservice = _dtobj.load_service(_objcls);
            //_dtpackage = _dtobj.load_package();
            //_dtdoctype = _dtobj.load_doctype();
            //_dtgroup = _dtobj.load_group();
            //_dtsubgroup = _dtobj.load_subgroup();
            //_dtsubgroup1 = _dtobj.load_subgroup1();
            //"<span onclick='return false;'>" + dsTreeSet.Tables[0].Rows[i]["TextField"].ToString() + "</span>";

            var _service = from o in publicCls.publicCls._dtservice.AsEnumerable()
                           select o;

            foreach (var row in _service)
            {
                TreeNode _root = new TreeNode();
                //_root.Text = "<span href='exp_coll(0)' onclick='javascript:exp_coll(0);' >" + row[2].ToString() + "</span>";
                _root.Text         = row[2].ToString();
                _root.Value        = row[0].ToString() + "#" + row[4].ToString();
                _root.SelectAction = TreeNodeSelectAction.Expand;
                //_root.NavigateUrl = "javascript:void(0)";
                //_root.NavigateUrl = "javascript:TreeView_ToggleNode(" + mytree.ClientID + "_Data," + 0 + "," + mytree.ClientID + "n" + 0 + ",’ ‘," + mytree.ClientID + "n" + 0 + "Nodes)";
                if (_root.Text != "")
                {
                    mytree.Nodes.Add(_root);
                }
                var _package = from o in publicCls.publicCls._dtpackage.AsEnumerable()
                               where o.Field <int>(5) == Convert.ToInt32(row[0].ToString())
                               select o;

                foreach (var row1 in _package)
                {
                    TreeNode _parent = new TreeNode();
                    _parent.Text         = row1[2].ToString();
                    _parent.Value        = row1[0].ToString() + "#" + row1[4].ToString();
                    _parent.SelectAction = TreeNodeSelectAction.Expand;
                    //_parent.NavigateUrl = "javascript:void(0)";
                    if (_parent.Text != "")
                    {
                        _root.ChildNodes.Add(_parent);
                    }
                    var _doctype = from o in publicCls.publicCls._dtdoctype.AsEnumerable()
                                   where o.Field <int>(5) == Convert.ToInt32(row1[0].ToString())
                                   select o;
                    foreach (var row2 in _doctype)
                    {
                        TreeNode _leaf = new TreeNode();
                        _leaf.Text  = row2[2].ToString();
                        _leaf.Value = row2[0].ToString() + "#" + row2[4].ToString();
                        //_leaf.SelectAction = TreeNodeSelectAction.Select;
                        string type = "0";
                        if (row2[7].ToString() == "1")
                        {
                            type = "1";
                        }
                        string path = row[2].ToString() + " > " + row1[2].ToString() + " > " + row2[2].ToString();
                        path = path.Replace("&", "<>");
                        _leaf.NavigateUrl = "javascript:openFrame('" + row2[0].ToString() + "_P" + path + row2[7].ToString() + "A" + "','" + type + "')";//A is identify for current apge
                        if (_leaf.Text != "")
                        {
                            _parent.ChildNodes.Add(_leaf);
                        }
                        var Group = from o in publicCls.publicCls._dtgroup.AsEnumerable()
                                    where o.Field <int>(5) == Convert.ToInt32(row2[0].ToString())
                                    select o;
                        foreach (var row3 in Group)
                        {
                            TreeNode _group = new TreeNode();
                            _group.Text  = row3[2].ToString();
                            _group.Value = row3[0] + "#" + row3[4].ToString();
                            if (_group.Text != "")
                            {
                                _leaf.ChildNodes.Add(_group);
                            }
                            var subgroup = from o in publicCls.publicCls._dtsubgroup.AsEnumerable()
                                           where o.Field <int>(5) == Convert.ToInt32(row3[0].ToString())
                                           select o;
                            foreach (var row4 in subgroup)
                            {
                                TreeNode _subgroup = new TreeNode();
                                _subgroup.Text  = row4[2].ToString();
                                _subgroup.Value = row4[0] + "#" + row4[4].ToString();
                                if (_subgroup.Text != "")
                                {
                                    _group.ChildNodes.Add(_subgroup);
                                }
                                var subgroup1 = from o in publicCls.publicCls._dtsubgroup1.AsEnumerable()
                                                where o.Field <int>(5) == Convert.ToInt32(row4[0].ToString())
                                                select o;
                                foreach (var row5 in subgroup1)
                                {
                                    TreeNode _subgroup1 = new TreeNode();
                                    _subgroup1.Text  = row5[2].ToString();
                                    _subgroup1.Value = row5[0] + "#" + row5[4].ToString();
                                    if (_subgroup1.Text != "")
                                    {
                                        _subgroup.ChildNodes.Add(_subgroup1);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            mytree.CollapseAll();
            //ExpandNode();
            //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" + (string)Session["_datapath"] + "');", true);
        }
Пример #22
0
        private void Populate_Tree(string _prj)
        {
            mytree.Nodes.Clear();
            publicCls.publicCls _obj = new publicCls.publicCls();
            _obj.Load_Tree(_prj, "nothing");
            var _service = from o in publicCls.publicCls._dtservice.AsEnumerable()
                           select o;
            string folder = "";

            foreach (var row in _service)
            {
                TreeNode _root = new TreeNode();
                _root.Text         = row[2].ToString();
                _root.Value        = row[0].ToString() + "#" + row[4].ToString();
                _root.SelectAction = TreeNodeSelectAction.Expand;
                folder             = row[2].ToString().Replace("&", "<>");
                // _root.NavigateUrl = "javascript:parent.openFrame('" + row[0].ToString() + "_P" + _prj + "')";
                if (_root.Text != "")
                {
                    mytree.Nodes.Add(_root);
                }
                var _package = from o in publicCls.publicCls._dtpackage.AsEnumerable()
                               where o.Field <int>(5) == Convert.ToInt32(row[0].ToString())
                               select o;

                foreach (var row1 in _package)
                {
                    TreeNode _parent = new TreeNode();
                    _parent.Text         = row1[2].ToString();
                    _parent.Value        = row1[0].ToString() + "#" + row1[4].ToString();
                    _parent.SelectAction = TreeNodeSelectAction.Expand;
                    folder = row1[2].ToString().Replace("&", "<>");
                    // _parent.NavigateUrl = "javascript:parent.openFrame('" + row1[0].ToString() + "_P" + _prj + "')";
                    if (_parent.Text != "")
                    {
                        _root.ChildNodes.Add(_parent);
                    }
                    var _doctype = from o in publicCls.publicCls._dtdoctype.AsEnumerable()
                                   where o.Field <int>(5) == Convert.ToInt32(row1[0].ToString())
                                   select o;
                    foreach (var row2 in _doctype)
                    {
                        TreeNode _leaf = new TreeNode();
                        _leaf.Text         = row2[2].ToString();
                        _leaf.Value        = row2[0].ToString() + "#" + row2[4].ToString();
                        _leaf.SelectAction = TreeNodeSelectAction.Expand;
                        folder             = row2[2].ToString().Replace("&", "<>");
                        _leaf.NavigateUrl  = "javascript:parent.openFrame('" + row2[0].ToString() + "_P" + _prj + "' )";
                        if (_leaf.Text != "")
                        {
                            _parent.ChildNodes.Add(_leaf);
                        }
                        var Group = from o in publicCls.publicCls._dtgroup.AsEnumerable()
                                    where o.Field <int>(5) == Convert.ToInt32(row2[0].ToString())
                                    select o;
                        foreach (var row3 in Group)
                        {
                            TreeNode _group = new TreeNode();
                            _group.Text         = row3[2].ToString();
                            _group.Value        = row3[0].ToString() + "#" + row3[4].ToString();
                            _group.SelectAction = TreeNodeSelectAction.Expand;
                            folder             = row3[2].ToString().Replace("&", "<>");
                            _group.NavigateUrl = "javascript:parent.openFrame('" + row3[0].ToString() + "_P" + _prj + "')";
                            if (_group.Text != "")
                            {
                                _leaf.ChildNodes.Add(_group);
                            }
                            var subgroup = from o in publicCls.publicCls._dtsubgroup.AsEnumerable()
                                           where o.Field <int>(5) == Convert.ToInt32(row3[0].ToString())
                                           select o;
                            foreach (var row4 in subgroup)
                            {
                                TreeNode _subgroup = new TreeNode();
                                _subgroup.Text         = row4[2].ToString();
                                _subgroup.Value        = row4[0].ToString() + "#" + row4[4].ToString();
                                _subgroup.SelectAction = TreeNodeSelectAction.Expand;
                                folder = row4[2].ToString().Replace("&", "<>");
                                _subgroup.NavigateUrl = "javascript:parent.openFrame('" + row4[0].ToString() + "_P" + _prj + "')";
                                if (_subgroup.Text != "")
                                {
                                    _group.ChildNodes.Add(_subgroup);
                                }
                                var subgroup1 = from o in publicCls.publicCls._dtsubgroup1.AsEnumerable()
                                                where o.Field <int>(5) == Convert.ToInt32(row4[0].ToString())
                                                select o;
                                foreach (var row5 in subgroup1)
                                {
                                    TreeNode _subgroup1 = new TreeNode();
                                    _subgroup1.Text         = row5[2].ToString();
                                    _subgroup1.Value        = row5[0].ToString() + "#" + row5[4].ToString();
                                    _subgroup1.SelectAction = TreeNodeSelectAction.Expand;
                                    folder = row5[2].ToString().Replace("&", "<>");
                                    _subgroup1.NavigateUrl = "javascript:parent.openFrame('" + row5[0].ToString() + "_P" + _prj + "')";
                                    if (_subgroup1.Text != "")
                                    {
                                        _subgroup.ChildNodes.Add(_subgroup1);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            mytree.CollapseAll();
        }
Пример #23
0
        protected void Send_Email()
        {
            BLL_Dml   _oblbll = new BLL_Dml();
            _database _objdb  = new _database();

            _objdb.DBName = "dbCML";
            _clsuser _objcls = new _clsuser();

            _objcls.project_code = lblpr.Text;
            string    ProjectName = _oblbll.Get_ProjectName(_objcls, _objdb);
            DataTable _dtable;
            string    Body  = "";
            string    _Link = "";
            string    _lnk  = "";

            publicCls.publicCls _obj = new publicCls.publicCls();
            string _sub = "Ref. " + ProjectName + "/" + (string)Session["mod_name"] + "/" + (string)Session["F_na_cms"] + "/" + txtdoc_name.Text;

            if ((string)Session["mod_name"] == "Minutes")
            {
                _lnk  = lblpr.Text + "M_" + (string)Session["mod_name"] + "F_" + (string)Session["F_na_cms"] + "FI_" + (string)Session["Fold_cms"];
                _lnk  = _lnk.Replace(" ", "%");
                _Link = "https://cmltechniques.com/UserLogin.aspx?Id=1P_" + _lnk;
                Body  = "Ref. " + ProjectName + "/" + (string)Session["mod_name"] + "/" + (string)Session["F_na_cms"] + "/" + txtdoc_name.Text + "\n\n" + "This is an automatically generated email to advise you that the " + (string)Session["mod_name"] + "  document noted above has been uploaded to CML Techniques " + ProjectName + " and is available for review." + "\n\n\n" + "Using the link below will direct to the " + ProjectName + " Minutes Page,upon login to CML Techniques." + "\n\n" + "Document Path : " + _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";
                //_objcls.mode = 4;
                //_dtable = _oblbll.Load_CMS_Users(_objcls, _objdb);
                //var _result = from o in _dtable.AsEnumerable()
                //              select o;
            }
            else if ((string)Session["mod_name"] == "Training")
            {
                _lnk  = lblpr.Text + "M_" + (string)Session["mod_name"] + "F_" + (string)Session["F_na_cms"] + "FI_" + (string)Session["Fold_cms"];
                _lnk  = _lnk.Replace(" ", "%");
                _Link = "https://cmltechniques.com/UserLogin.aspx?Id=1P_" + _lnk;
                Body  = "Ref. " + ProjectName + "/" + (string)Session["mod_name"] + "/" + (string)Session["F_na_cms"] + "/" + txtdoc_name.Text + "\n\n" + "This is an automatically generated email to advise you that the " + (string)Session["mod_name"] + "  document noted above has been uploaded to CML Techniques " + ProjectName + " and is available for review." + "\n\n\n" + "Using the link below will direct to the " + ProjectName + " Training Page,upon login to CML Techniques." + "\n\n" + "Document Path : " + _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";
                //_objcls.mode = 8;
                //_dtable = _oblbll.Load_CMS_Users(_objcls, _objdb);
                //var _result = from o in _dtable.AsEnumerable()
                //              select o;
                //foreach (var _uid in _result)
                //{
                //    _obj.Send_Email(_uid[0].ToString(), _sub, Body);
                //}
            }
            else if ((string)Session["mod_name"] == "Commissioning Plan")
            {
                _Link = "https://cmltechniques.com/UserLogin.aspx?Id=1P_" + lblpr.Text + "M_CP";

                Body = "Ref. " + ProjectName + "/" + (string)Session["mod_name"] + "/" + (string)Session["F_na_cms"] + "/" + txtdoc_name.Text + "\n\n" + "This is an automatically generated email to advise you that the " + (string)Session["mod_name"] + "  document noted above has been uploaded to CML Techniques " + ProjectName + " and is available for review." + "\n\n" + "Could you please find time to review the document and make any comments using the document review page of the " + (string)Session["mod_name"] + "." + "\n\n\n" + "Using the link below will direct to the " + ProjectName + " Commissiong Plan Page,upon login to CML Techniques." + "\n\n" + "Document Path : " + _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";
                //_objcls.mode = 2;
                //_dtable = _oblbll.Load_CMS_Users(_objcls, _objdb);
                //var _result = from o in _dtable.AsEnumerable()
                //              select o;
                //foreach (var _uid in _result)
                //{
                //    _obj.Send_Email(_uid[0].ToString(), _sub, Body);
                //}
            }
            else if ((string)Session["mod_name"] == "Commissioning Reports")
            {
                _Link = "https://cmltechniques.com/UserLogin.aspx?Id=1P_" + lblpr.Text + "M_CR";

                Body = "Ref. " + ProjectName + "/" + (string)Session["mod_name"] + "/" + (string)Session["F_na_cms"] + "/" + txtdoc_name.Text + "\n\n" + "This is an automatically generated email to advise you that the " + (string)Session["mod_name"] + "  document noted above has been uploaded to CML Techniques " + ProjectName + " and is available for review." + "\n\n" + "Could you please find time to review the document and make any comments using the document review page of the " + (string)Session["mod_name"] + "." + "\n\n\n" + "Using the link below will direct to the " + ProjectName + " Commissiong Plan Page,upon login to CML Techniques." + "\n\n" + "Document Path : " + _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";
                //_objcls.mode = 2;
                //_dtable = _oblbll.Load_CMS_Users(_objcls, _objdb);
                //var _result = from o in _dtable.AsEnumerable()
                //              select o;
                //foreach (var _uid in _result)
                //{
                //    _obj.Send_Email(_uid[0].ToString(), _sub, Body);
                //}
            }
            else if ((string)Session["mod_name"] == "Method Statement")
            {
                //_lnk = lblmspath.Text;
                //_lnk = _lnk.Replace(" ", "%");
                //_lnk = _lnk.Replace(">", "_A");
                //_Link = "http://www.cmltechniques.com/UserLogin.aspx?Id=1P_" + _lnk + "M_1";
                //Body = "Ref. " + ProjectName + " > " + (string)Session["F_na_cms"] + " > " + txtdoc_name.Text + "\n\n" + "This is an automatically generated email to advise you that the " + (string)Session["mod_name"] + "  document noted above has been uploaded to CML Techniques " + ProjectName + " and is available for review." + "\n\n" + "Could you please find time to review the document and make any comments using the document review page of the " + (string)Session["mod_name"] + "." + "\n\n\n" + "Using the link below will direct to the " + ProjectName + " Method Statements Page,upon login to CML Techniques." + "\n\n" + "Document Path : " + _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.cmltechniques.com";
                Body = "Ref. " + ProjectName + " > " + (string)Session["F_na_cms"] + " > " + txtdoc_name.Text + "\n\n" + "This is an automatically generated email to advise you that the " + (string)Session["mod_name"] + "  document noted above has been uploaded to CML Techniques " + ProjectName + " and is available for review." + "\n\n" + "Could you please find time to review the document and make any comments using the document review page of the " + (string)Session["mod_name"] + "." + "\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";
                //_objcls.mode = 3;
                //_dtable = _oblbll.Load_CMS_Users(_objcls, _objdb);
                //var _result = from o in _dtable.AsEnumerable()
                //              select o;
                //foreach (var _uid in _result)
                //{
                //    _obj.Send_Email(_uid[0].ToString(), _sub, Body);
                //}
                // _obj.Send_Email("*****@*****.**", _sub, Body);
                //_clsproject _objprj = new _clsproject();
                //for (int i = 0; i <= chk_company.Items.Count - 1; i++)
                //{
                //    if (chk_company.Items[i].Selected == true)
                //    {
                //        _objprj.com_id = Convert.ToInt32(chk_company.Items[i].Value);
                //        DataTable _dt = _oblbll.Load_UsersCompany(_objprj, _objdb);
                //        var _result = from o in _dt.AsEnumerable()
                //                      select o;
                //        foreach (var _uid in _result)
                //        {
                //            //_sub = _uid[0].ToString();
                //            //_obj.Send_Email("*****@*****.**", _sub, Body);
                //            _obj.Send_Email(_uid[0].ToString(), _sub, Body);
                //        }
                //    }
                //}
            }
            else if ((string)Session["mod_name"] == "Programmes")
            {
                _lnk  = lblpr.Text + "M_" + (string)Session["mod_name"] + "F_" + (string)Session["F_na_cms"] + "FI_" + (string)Session["Fold_cms"];
                _lnk  = _lnk.Replace(" ", "%");
                _Link = "https://cmltechniques.com/UserLogin.aspx?Id=1P_" + _lnk;
                Body  = "Ref. " + ProjectName + "/" + (string)Session["mod_name"] + "/" + (string)Session["F_na_cms"] + "/" + txtdoc_name.Text + "\n\n" + "This is an automatically generated email to advise you that the " + (string)Session["mod_name"] + "  document noted above has been uploaded to CML Techniques " + ProjectName + " and is available for review." + "\n\n" + "Could you please find time to review the document and make any comments using the document review page of the " + (string)Session["mod_name"] + "." + "\n\n\n" + "Using the link below will direct to the " + ProjectName + " Programmes Page,upon login to CML Techniques." + "\n\n" + "Document Path : " + _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";
                //_objcls.mode = 5;
                //_dtable = _oblbll.Load_CMS_Users(_objcls, _objdb);
                //var _result = from o in _dtable.AsEnumerable()
                //              select o;
                //foreach (var _uid in _result)
                //{
                //    _obj.Send_Email(_uid[0].ToString(), _sub, Body);
                //}
            }
            foreach (ListItem _lst in chkprjusers.Items)
            {
                if (_lst.Selected == true)
                {
                    string _email = _lst.Text;
                    _obj.Send_Email(_email, _sub, Body);
                }
            }
        }
Пример #24
0
        private void Populate_Tree()
        {
            publicCls.publicCls _obj = new publicCls.publicCls();
            _obj.Load_Tree(lblprj.Text, (string)Session["uid"]);
            mytree.Nodes.Clear();
            //BLL_Dml _dtobj = new BLL_Dml();
            //_clsuser  _objcls = new _clsuser ();
            //_objcls.project_code = (string)Session["project"];
            //_objcls.uid = (string)Session["uid"];
            //_dtservice = _dtobj.load_service(_objcls);
            //_dtpackage = _dtobj.load_package();
            //_dtdoctype = _dtobj.load_doctype();
            //_dtgroup = _dtobj.load_group();
            //_dtsubgroup = _dtobj.load_subgroup();
            //_dtsubgroup1 = _dtobj.load_subgroup1();
            //"<span onclick='return false;'>" + dsTreeSet.Tables[0].Rows[i]["TextField"].ToString() + "</span>";

            var _service = from o in publicCls.publicCls._dtservice.AsEnumerable()
                           select o;

            foreach (var row in _service)
            {
                TreeNode _root = new TreeNode();
                //_root.Text = "<span href='exp_coll(0)' onclick='javascript:exp_coll(0);' >" + row[2].ToString() + "</span>";
                _root.Text  = row[2].ToString();
                _root.Value = row[0].ToString() + "#" + row[4].ToString();
                //_root.SelectAction = TreeNodeSelectAction.Expand;
                //_root.NavigateUrl = "javascript:void(0)";
                //_root.NavigateUrl = "javascript:TreeView_ToggleNode(" + mytree.ClientID + "_Data," + 0 + "," + mytree.ClientID + "n" + 0 + ",’ ‘," + mytree.ClientID + "n" + 0 + "Nodes)";
                if (row[3].ToString() == "10")
                {
                    _root.SelectAction = TreeNodeSelectAction.Select;
                    string _prm = lblprj.Text + "_P" + row[7].ToString();
                    _root.NavigateUrl = "javascript:parent.openView('" + _prm + "')";
                }
                else
                {
                    _root.SelectAction = TreeNodeSelectAction.Expand;
                }

                if (_root.Text != "")
                {
                    mytree.Nodes.Add(_root);
                }
                var _package = from o in publicCls.publicCls._dtpackage.AsEnumerable()
                               where o.Field <int>(5) == Convert.ToInt32(row[0].ToString())
                               select o;

                foreach (var row1 in _package)
                {
                    TreeNode _parent = new TreeNode();
                    _parent.Text         = row1[2].ToString();
                    _parent.Value        = row1[0].ToString() + "#" + row1[4].ToString();
                    _parent.SelectAction = TreeNodeSelectAction.Expand;
                    //_parent.NavigateUrl = "javascript:void(0)";
                    if (_parent.Text != "")
                    {
                        _root.ChildNodes.Add(_parent);
                    }
                    var _doctype = from o in publicCls.publicCls._dtdoctype.AsEnumerable()
                                   where o.Field <int>(5) == Convert.ToInt32(row1[0].ToString())
                                   select o;
                    foreach (var row2 in _doctype)
                    {
                        TreeNode _leaf = new TreeNode();
                        _leaf.Text  = row2[2].ToString();
                        _leaf.Value = row2[0].ToString() + "#" + row2[4].ToString();
                        //_leaf.SelectAction = TreeNodeSelectAction.Select;
                        string type = row2[7].ToString();
                        if (row2[7].ToString() == "1")
                        {
                            type = "1";
                        }
                        string path = row[2].ToString() + "@" + row1[2].ToString() + "*" + row2[2].ToString();
                        path = path.Replace("&", "<>");
                        _leaf.NavigateUrl = "javascript:parent.openFrame('" + lblprj.Text + "_R" + row2[0].ToString() + "_P" + path + row2[7].ToString() + "_B" + "','" + type + "')";
                        if (_leaf.Text != "")
                        {
                            _parent.ChildNodes.Add(_leaf);
                        }
                        string _vpath = _leaf.ValuePath;
                        var    Group  = from o in publicCls.publicCls._dtgroup.AsEnumerable()
                                        where o.Field <int>(5) == Convert.ToInt32(row2[0].ToString())
                                        select o;
                        foreach (var row3 in Group)
                        {
                            TreeNode _group = new TreeNode();
                            _group.Text  = row3[2].ToString();
                            _group.Value = row3[0] + "#" + row3[4].ToString();
                            if (row3[7].ToString() == "1")
                            {
                                type = "1";
                            }
                            else
                            {
                                type = row3[7].ToString();
                            }
                            path = row[2].ToString() + "@" + row1[2].ToString() + "*" + row3[2].ToString();
                            path = path.Replace("&", "<>");
                            _group.NavigateUrl = "javascript:parent.openFrame('" + lblprj.Text + "_R" + row3[0].ToString() + "_P" + path + row2[7].ToString() + "_B" + "','" + type + "')";
                            if (_group.Text != "")
                            {
                                _leaf.ChildNodes.Add(_group);
                            }
                            var subgroup = from o in publicCls.publicCls._dtsubgroup.AsEnumerable()
                                           where o.Field <int>(5) == Convert.ToInt32(row3[0].ToString())
                                           select o;
                            foreach (var row4 in subgroup)
                            {
                                TreeNode _subgroup = new TreeNode();
                                _subgroup.Text        = row4[2].ToString();
                                _subgroup.Value       = row4[0] + "#" + row4[4].ToString();
                                path                  = row[2].ToString() + "@" + row1[2].ToString() + "*" + row4[2].ToString();
                                path                  = path.Replace("&", "<>");
                                type                  = row2[7].ToString();
                                _subgroup.NavigateUrl = "javascript:parent.openFrame('" + lblprj.Text + "_R" + row4[0].ToString() + "_P" + path + row3[7].ToString() + "_B" + "','" + type + "')";
                                if (_subgroup.Text != "")
                                {
                                    _group.ChildNodes.Add(_subgroup);
                                }
                                var subgroup1 = from o in publicCls.publicCls._dtsubgroup1.AsEnumerable()
                                                where o.Field <int>(5) == Convert.ToInt32(row4[0].ToString())
                                                select o;
                                foreach (var row5 in subgroup1)
                                {
                                    TreeNode _subgroup1 = new TreeNode();
                                    _subgroup1.Text  = row5[2].ToString();
                                    _subgroup1.Value = row5[0] + "#" + row5[4].ToString();
                                    if (_subgroup1.Text != "")
                                    {
                                        _subgroup.ChildNodes.Add(_subgroup1);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            mytree.CollapseAll();
            //mytree.FindNode("14584#1/14590#2/14591#1").Expand();
            //mytree.FindNode("14584#1").Expand();
            //mytree.FindNode("14584#1/14590#2").Expand();
        }
Пример #25
0
        private void Populate_Tree()
        {
            //Session["project"] = "1";
            //Session["uid"] = "*****@*****.**";
            publicCls.publicCls _obj = new publicCls.publicCls();
            _obj.Load_Tree((string)Session["project"], (string)Session["uid"]);
            mytree.Nodes.Clear();
            var _service = from o in publicCls.publicCls._dtservice.AsEnumerable()
                           select o;

            foreach (var row in _service)
            {
                TreeNode _root = new TreeNode();
                //_root.Text = "<span href='exp_coll(0)' onclick='javascript:exp_coll(0);' >" + row[2].ToString() + "</span>";
                _root.Text         = row[2].ToString();
                _root.Value        = row[0].ToString() + "#" + row[4].ToString();
                _root.SelectAction = TreeNodeSelectAction.Expand;
                //_root.NavigateUrl = "javascript:void(0)";
                //_root.NavigateUrl = "javascript:TreeView_ToggleNode(" + mytree.ClientID + "_Data," + 0 + "," + mytree.ClientID + "n" + 0 + ",’ ‘," + mytree.ClientID + "n" + 0 + "Nodes)";
                if (_root.Text != "")
                {
                    mytree.Nodes.Add(_root);
                }
                var _package = from o in publicCls.publicCls._dtpackage.AsEnumerable()
                               where o.Field <int>(5) == Convert.ToInt32(row[0].ToString())
                               select o;

                foreach (var row1 in _package)
                {
                    TreeNode _parent = new TreeNode();
                    _parent.Text         = row1[2].ToString();
                    _parent.Value        = row1[0].ToString() + "#" + row1[4].ToString();
                    _parent.SelectAction = TreeNodeSelectAction.Expand;
                    //_parent.NavigateUrl = "javascript:void(0)";
                    if (_parent.Text != "")
                    {
                        _root.ChildNodes.Add(_parent);
                    }
                    var _doctype = from o in publicCls.publicCls._dtdoctype.AsEnumerable()
                                   where o.Field <int>(5) == Convert.ToInt32(row1[0].ToString())
                                   select o;
                    foreach (var row2 in _doctype)
                    {
                        TreeNode _leaf = new TreeNode();
                        _leaf.Text  = row2[2].ToString();
                        _leaf.Value = row2[0].ToString() + "#" + row2[4].ToString();
                        //_leaf.SelectAction = TreeNodeSelectAction.Select;
                        string type = row2[7].ToString();
                        if (row2[7].ToString() == "1")
                        {
                            type = "1";
                        }
                        string path = row[2].ToString() + "@" + row1[2].ToString() + "*" + row2[2].ToString();
                        path = path.Replace("&", "<>");
                        _leaf.NavigateUrl = "javascript:openFrame('" + row2[0].ToString() + "_P" + path + row2[7].ToString() + "_B" + "','" + type + "')";
                        if (_leaf.Text != "")
                        {
                            _parent.ChildNodes.Add(_leaf);
                        }
                        var Group = from o in publicCls.publicCls._dtgroup.AsEnumerable()
                                    where o.Field <int>(5) == Convert.ToInt32(row2[0].ToString())
                                    select o;
                        foreach (var row3 in Group)
                        {
                            TreeNode _group = new TreeNode();
                            _group.Text  = row3[2].ToString();
                            _group.Value = row3[0] + "#" + row3[4].ToString();
                            if (row2[7].ToString() == "1")
                            {
                                type = "1";
                            }
                            else
                            {
                                type = row2[7].ToString();
                            }
                            path = row[2].ToString() + "@" + row1[2].ToString() + "*" + row3[2].ToString();
                            path = path.Replace("&", "<>");
                            _group.NavigateUrl = "javascript:openFrame('" + row3[0].ToString() + "_P" + path + row2[7].ToString() + "_B" + "','" + type + "')";
                            if (_group.Text != "")
                            {
                                _leaf.ChildNodes.Add(_group);
                            }
                            var subgroup = from o in publicCls.publicCls._dtsubgroup.AsEnumerable()
                                           where o.Field <int>(5) == Convert.ToInt32(row3[0].ToString())
                                           select o;
                            foreach (var row4 in subgroup)
                            {
                                TreeNode _subgroup = new TreeNode();
                                _subgroup.Text        = row4[2].ToString();
                                _subgroup.Value       = row4[0] + "#" + row4[4].ToString();
                                path                  = row[2].ToString() + "@" + row1[2].ToString() + "*" + row4[2].ToString();
                                path                  = path.Replace("&", "<>");
                                type                  = row2[7].ToString();
                                _subgroup.NavigateUrl = "javascript:openFrame('" + row4[0].ToString() + "_P" + path + row3[7].ToString() + "_B" + "','" + type + "')";
                                if (_subgroup.Text != "")
                                {
                                    _group.ChildNodes.Add(_subgroup);
                                }
                                var subgroup1 = from o in publicCls.publicCls._dtsubgroup1.AsEnumerable()
                                                where o.Field <int>(5) == Convert.ToInt32(row4[0].ToString())
                                                select o;
                                foreach (var row5 in subgroup1)
                                {
                                    TreeNode _subgroup1 = new TreeNode();
                                    _subgroup1.Text  = row5[2].ToString();
                                    _subgroup1.Value = row5[0] + "#" + row5[4].ToString();
                                    if (_subgroup1.Text != "")
                                    {
                                        _subgroup.ChildNodes.Add(_subgroup1);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            mytree.CollapseAll();
        }
Пример #26
0
        private void SendReminder(string _project)
        {
            publicCls.publicCls _obj1 = new publicCls.publicCls();
            _obj1.Load_doc_dur();
            DateTime _today  = DateTime.Now;
            BLL_Dml  _objbll = new BLL_Dml();

            _database _objdb = new _database();

            _objdb.DBName = "dbCML";
            _clsdocduration _obj    = new _clsdocduration();
            var             _result = from o in publicCls.publicCls._dtdocdur.AsEnumerable()
                                      where o.Field <string>(9) == _project
                                      select o;

            //int count = 1;
            foreach (var row in _result)
            {
                //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('yES');", true);
                //return;
                DateTime _upload = Convert.ToDateTime(row[4].ToString());
                TimeSpan _Diff   = _today.Subtract(_upload);
                //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('"+ _Diff.Days.ToString() + row[6].ToString() +"');", true);
                //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" +  + "');", true);
                int _srv = Convert.ToInt32(row[13].ToString());
                _obj.Folder_id = Convert.ToInt32(row[11].ToString());
                if (_Diff.Days.ToString() == row[6].ToString())
                {
                    //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" + _Diff.Days.ToString() + row[12].ToString() + "');", true);
                    //if (count > 3) return;
                    //count += 1;
                    if (row[12].ToString() != "1")
                    {
                        if (row[6].ToString() != "0")
                        {
                            _obj.Remind = 1;
                            int _days = Convert.ToInt32(row[5].ToString()) - Convert.ToInt32(row[6].ToString());

                            SendRem(row[5].ToString(), _days.ToString(), row[10].ToString(), row[2].ToString(), "First Reminder", _srv);
                            _objbll.Set_Reminder(_obj, _objdb);
                        }
                    }
                }
                else if (_Diff.Days.ToString() == row[7].ToString())
                {
                    if (row[12].ToString() != "2")
                    {
                        if (row[7].ToString() != "0")
                        {
                            _obj.Remind = 2;
                            int _days = Convert.ToInt32(row[5].ToString()) - Convert.ToInt32(row[7].ToString());
                            //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" + row[7].ToString() + "');", true);
                            SendRem(row[5].ToString(), _days.ToString(), row[10].ToString(), row[2].ToString(), "Second Reminder", _srv);
                            _objbll.Set_Reminder(_obj, _objdb);
                        }
                    }
                }
                else if (_Diff.Days.ToString() == row[8].ToString())
                {
                    if (row[12].ToString() != "3")
                    {
                        if (row[8].ToString() != "0")
                        {
                            _obj.Remind = 3;
                            int _days = Convert.ToInt32(row[5].ToString()) - Convert.ToInt32(row[8].ToString());
                            //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" + _Diff.Days.ToString() + "');", true);
                            if (_days > 0)
                            {
                                SendRem(row[5].ToString(), _days.ToString(), row[10].ToString(), row[2].ToString(), "Third Reminder", _srv);
                                _objbll.Set_Reminder(_obj, _objdb);
                            }
                            else
                            {
                                SendCon(row[5].ToString(), row[10].ToString(), row[2].ToString(), Convert.ToInt32(row[0].ToString()), _srv);
                            }
                        }
                    }
                }
                else if (_Diff.Days >= Convert.ToInt32(row[5].ToString()))
                {
                    SendCon(row[5].ToString(), row[10].ToString(), row[2].ToString(), Convert.ToInt32(row[0].ToString()), _srv);
                }
            }
        }
Пример #27
0
        private void Load_document()
        {
            myframe.Visible = false;
            string _value = Request.QueryString[0].ToString();

            _value = _value.Replace("<>", "&");
            //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" + _value + "');", true);
            string _path = _value.Substring(_value.IndexOf("_P") + 2, _value.IndexOf("_B") - (_value.IndexOf("_P") + 3));

            _path             = _path.Replace("@", " > ");
            _path             = _path.Replace("*", " > ");
            Session["parent"] = _value.Substring(_value.Length - 1);
            Session["type"]   = _value.Substring(_value.Length - 3, 1);
            Session["folder"] = _value.Substring(_value.IndexOf("*") + 1, _value.IndexOf("_B") - _value.IndexOf("*") - 2);
            //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" + (string)Session["parent"] + "');", true);
            lblprj.Text = _value.Substring(0, _value.IndexOf("_R"));
            int _id = Convert.ToInt32(_value.Substring(_value.IndexOf("_R") + 2, _value.IndexOf("_P") - (_value.IndexOf("_R") + 2)));

            //int _id = Convert.ToInt32(Request.QueryString[0].ToString());
            Label1.Text = _path;
            bool _enable = true;

            publicCls.publicCls _obj = new publicCls.publicCls();
            _obj.Load_Documents();
            mydocgrid.Visible            = true;
            publicCls.publicCls._doctype = "0";
            DataTable _dtable2 = new DataTable();

            _dtable2.Columns.Add("doc_name");
            _dtable2.Columns.Add("doc_title");
            _dtable2.Columns.Add("uploaded_date");
            _dtable2.Columns.Add("file_size");
            _dtable2.Columns.Add("type");
            //_dtable1.Columns.Add("STATUS");
            var Result1 = from o in publicCls.publicCls._dtdocuments.AsEnumerable()
                          where o.Field <int>(0) == _id && o.Field <bool>(1) == _enable
                          select o;

            foreach (var row in Result1)
            {
                DataRow _myrow = _dtable2.NewRow();
                _myrow[0] = row[4].ToString();
                DateTime _date = Convert.ToDateTime(row[6].ToString());
                _myrow[1] = row[3].ToString();
                _myrow[2] = string.Format("{0:dd/MM/yyyy}", _date);
                _myrow[3] = row[7].ToString();
                _myrow[4] = "0";
                _dtable2.Rows.Add(_myrow);
            }
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

            _objdb.DBName = "DBCML";
            _clscassheet _objcls = new _clscassheet();

            _objcls.prj_code = lblprj.Text;
            _objcls.srv      = _id;
            DataTable _dt = _objbll.Load_DMS_TCDOC_SYS(_objcls, _objdb);

            _objdb.DBName = "DB_" + lblprj.Text;
            foreach (DataRow _drow in _dt.Rows)
            {
                _objcls.sys = Convert.ToInt32(_drow[0].ToString());
                DataTable _dt1 = _objbll.Load_DMS_TCDOC(_objcls, _objdb);
                foreach (DataRow _drow1 in _dt1.Rows)
                {
                    DataRow _myrow = _dtable2.NewRow();
                    _myrow[0] = _drow1[0].ToString();
                    _myrow[1] = _drow1[2].ToString();
                    _myrow[2] = _drow1[1].ToString();
                    _myrow[3] = "";
                    _myrow[4] = "1";
                    _dtable2.Rows.Add(_myrow);
                }
            }
            //if ((string)Session["type"] == "3")
            //{
            //    mydocgrid.Visible = false;
            //    mygriddr.Visible = true;
            //    mygriddr.DataSource = _dtable2;
            //    mygriddr.DataBind();

            //}
            //else
            //{
            //mygriddr.Visible = false;
            mydocgrid.Visible    = true;
            mydocgrid.DataSource = _dtable2;
            mydocgrid.DataBind();

            //}
            Load_ScheduleList(_id, lblprj.Text);
            GetSummary(_id);
        }
Пример #28
0
        private void Populate_Tree()
        {
            // ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" + (string)Session["project"] + "');", true);
            mytree.Nodes.Clear();
            publicCls.publicCls _obj = new publicCls.publicCls();
            _obj.Load_Tree((string)Session["project"], "nothing");
            var _service = from o in publicCls.publicCls._dtservice.AsEnumerable()
                           select o;
            string folder = "";

            foreach (var row in _service)
            {
                TreeNode _root = new TreeNode();
                _root.Text         = row[2].ToString();
                _root.Value        = row[0].ToString() + "#" + row[4].ToString();
                _root.SelectAction = TreeNodeSelectAction.Expand;
                if (_root.Text != "")
                {
                    mytree.Nodes.Add(_root);
                }
                var _package = from o in publicCls.publicCls._dtpackage.AsEnumerable()
                               where o.Field <int>(5) == Convert.ToInt32(row[0].ToString())
                               select o;

                foreach (var row1 in _package)
                {
                    TreeNode _parent = new TreeNode();
                    _parent.Text         = row1[2].ToString();
                    _parent.Value        = row1[0].ToString() + "#" + row1[4].ToString();
                    _parent.SelectAction = TreeNodeSelectAction.Expand;
                    if (_parent.Text != "")
                    {
                        _root.ChildNodes.Add(_parent);
                    }
                    var _doctype = from o in publicCls.publicCls._dtdoctype.AsEnumerable()
                                   where o.Field <int>(5) == Convert.ToInt32(row1[0].ToString())
                                   select o;
                    foreach (var row2 in _doctype)
                    {
                        TreeNode _leaf = new TreeNode();
                        _leaf.Text         = row2[2].ToString();
                        _leaf.Value        = row2[0].ToString() + "#" + row2[4].ToString();
                        _leaf.SelectAction = TreeNodeSelectAction.Expand;
                        folder             = row2[2].ToString().Replace("&", "<>");
                        _leaf.NavigateUrl  = "javascript:openFrame('" + row2[0].ToString() + "_P" + row1[0].ToString() + "_S" + row[0].ToString() + "_N" + folder + "_T" + row2[7].ToString() + "' )";
                        if (_leaf.Text != "")
                        {
                            _parent.ChildNodes.Add(_leaf);
                        }
                        var Group = from o in publicCls.publicCls._dtgroup.AsEnumerable()
                                    where o.Field <int>(5) == Convert.ToInt32(row2[0].ToString())
                                    select o;
                        foreach (var row3 in Group)
                        {
                            TreeNode _group = new TreeNode();
                            _group.Text         = row3[2].ToString();
                            _group.Value        = row3[0].ToString() + "#" + row3[4].ToString();
                            _group.SelectAction = TreeNodeSelectAction.Expand;
                            folder             = row3[2].ToString().Replace("&", "<>");
                            _group.NavigateUrl = "javascript:openFrame('" + row3[0].ToString() + "_P" + row1[0].ToString() + "_S" + row[0].ToString() + "_N" + folder + "_T" + row3[7].ToString() + "_D" + row2[0].ToString() + "'  )";
                            if (_group.Text != "")
                            {
                                _leaf.ChildNodes.Add(_group);
                            }
                            var subgroup = from o in publicCls.publicCls._dtsubgroup.AsEnumerable()
                                           where o.Field <int>(5) == Convert.ToInt32(row3[0].ToString())
                                           select o;
                            foreach (var row4 in subgroup)
                            {
                                TreeNode _subgroup = new TreeNode();
                                _subgroup.Text         = row4[2].ToString();
                                _subgroup.Value        = row4[0].ToString() + "#" + row4[4].ToString();
                                _subgroup.SelectAction = TreeNodeSelectAction.Expand;
                                folder = row4[2].ToString().Replace("&", "<>");
                                _subgroup.NavigateUrl = "javascript:openFrame('" + row4[0].ToString() + "_P" + row1[0].ToString() + "_S" + row[0].ToString() + "_N" + folder + "_T" + row3[7].ToString() + "_D" + row3[0].ToString() + "' )";//
                                if (_subgroup.Text != "")
                                {
                                    _group.ChildNodes.Add(_subgroup);
                                }
                                var subgroup1 = from o in publicCls.publicCls._dtsubgroup1.AsEnumerable()
                                                where o.Field <int>(5) == Convert.ToInt32(row4[0].ToString())
                                                select o;
                                foreach (var row5 in subgroup1)
                                {
                                    TreeNode _subgroup1 = new TreeNode();
                                    _subgroup1.Text         = row5[2].ToString();
                                    _subgroup1.Value        = row5[0].ToString() + "#" + row5[4].ToString();
                                    _subgroup1.SelectAction = TreeNodeSelectAction.Expand;
                                    folder = row5[2].ToString().Replace("&", "<>");
                                    _subgroup1.NavigateUrl = "javascript:openFrame('" + row5[0].ToString() + "_P" + row1[0].ToString() + "_S" + row[0].ToString() + "_N" + folder + "' )";
                                    if (_subgroup1.Text != "")
                                    {
                                        _subgroup.ChildNodes.Add(_subgroup1);
                                    }
                                }
                            }
                        }
                    }
                }
            }
            mytree.CollapseAll();
        }
Пример #29
0
        private void load_document()
        {
            //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" + (string)Session["path"] + "');", true);
            //Label1.Text =Session["path"].ToString();
            string _value = Request.QueryString[0].ToString();

            Session["_datapath"] = _value.Substring(_value.IndexOf("_P") + 2);
            Session["_datapath"] = (string)Session["_datapath"].ToString().Replace(" & ", "<>");
            lblprj.Text          = _value.Substring(0, _value.IndexOf("_R"));
            int _id = Convert.ToInt32(_value.Substring(_value.IndexOf("_R") + 2, _value.IndexOf("_P") - (_value.IndexOf("_R") + 2)));
            //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "alert('" + _id.ToString() + "');", true);
            bool _enable = true;

            publicCls.publicCls _obj = new publicCls.publicCls();
            _obj.Load_Documents();
            publicCls.publicCls._doctype = "1";
            DataTable _dtable1 = new DataTable();

            _dtable1.Columns.Add("doc_name");
            _dtable1.Columns.Add("uploaded_date");
            _dtable1.Columns.Add("file_size");
            _dtable1.Columns.Add("version");
            _dtable1.Columns.Add("STATUS");
            _dtable1.Columns.Add("doc_id");
            var Result = from o in publicCls.publicCls._dtdocuments.AsEnumerable()
                         where o.Field <int>(0) == _id && o.Field <bool>(1) == _enable
                         select o;

            foreach (var row in Result)
            {
                DataRow _myrow = _dtable1.NewRow();
                _myrow[0] = row[4].ToString();
                DateTime _date = Convert.ToDateTime(row[6].ToString());
                _myrow[1] = string.Format("{0:dd/MM/yyyy}", _date);
                _myrow[2] = row[7].ToString();
                _myrow[3] = row[9].ToString();
                _myrow[4] = row[11].ToString();
                _myrow[5] = row[2].ToString();
                _dtable1.Rows.Add(_myrow);
            }
            mydocgridom.DataSource = _dtable1;
            mydocgridom.DataBind();
            DataTable _dtable3 = new DataTable();

            _dtable3.Columns.Add("doc_name");
            _dtable3.Columns.Add("version");
            _dtable3.Columns.Add("comments");
            _dtable3.Columns.Add("uploaded_date");
            _dtable3.Columns.Add("STATUS");
            _enable = false;
            var Result3 = from o in publicCls.publicCls._dtdocuments.AsEnumerable()
                          where o.Field <int>(0) == _id && o.Field <bool>(1) == _enable
                          select o;

            foreach (var row in Result3)
            {
                DataRow _myrow = _dtable3.NewRow();
                _myrow[0] = row[4].ToString();
                _myrow[1] = row[9].ToString();
                _myrow[2] = row[10].ToString();
                DateTime _date = Convert.ToDateTime(row[6].ToString());
                _myrow[3] = string.Format("{0:dd/MM/yyyy}", _date);
                _myrow[4] = row[11].ToString();
                _dtable3.Rows.Add(_myrow);
            }
            gridprv.DataSource = _dtable3;
            gridprv.DataBind();
        }