Exemplo n.º 1
0
        public Stream ShowProjectImage(string projectcode)
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.project_code = projectcode;
            DataTable dt = _objbll.Get_ProjectInformation(_objcls, _objdb);

            object img = null;

            foreach (DataRow dr in dt.Rows)
            {
                img = dr["prj_logo"];
            }

            try
            {
                return(new MemoryStream((byte[])img));
            }
            catch
            {
                return(null);
            }
        }
        protected void btnsave_Click(object sender, EventArgs e)
        {
            Delete_existing();
            for (int ins = 0; ins <= myprojectgrid.Rows.Count - 1; ins++)
            {
                BLL_Dml   _objbll = new BLL_Dml();
                _database _objdb  = new _database();
                _objdb.DBName = "dbCML";
                _clsuser _objcls = new _clsuser();
                _objcls.uid = druserid.SelectedItem.Text;



                CheckBox cms = (CheckBox)myprojectgrid.Rows[ins].Cells[2].Controls[0];
                CheckBox dms = (CheckBox)myprojectgrid.Rows[ins].Cells[3].Controls[0];
                CheckBox ams = (CheckBox)myprojectgrid.Rows[ins].Cells[4].Controls[0];

                _objcls.mode = Convert.ToInt32(myprojectgrid.Rows[ins].Cells[0].Text);
                _objcls.CMS  = cms.Checked;
                _objcls.DMS  = dms.Checked;
                _objcls.TMS  = ams.Checked;
                _objbll.Insert_User_Prj_Modules(_objcls, _objdb);
            }
            lblmessage.Text = "Module Successfully Saved";
            string script = "function f(){$find(\"" + RadWindow2.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";

            ScriptManager.RegisterStartupScript(this, this.GetType(), "key", script, true);
            clear();
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
0
        bool DashboardAcces(string Project)
        {
            bool         dashboard = false;
            BLL_Dml      _objbll   = new BLL_Dml();
            _database    _objdb    = new _database();
            _clsuser     _objcls   = new _clsuser();
            _clscassheet _objcls1  = new _clscassheet();

            _objdb.DBName        = "dbCML";
            _objcls.uid          = (string)Session["uid"];
            _objcls.project_code = Project;
            string _permission = _objbll.Get_User_Permission(_objcls, _objdb);

            _objdb.DBName = "DB_" + Project;
            DataTable _dtmodule = _objbll.Load_Prj_Module(_objdb);

            var _module = from o in _dtmodule.AsEnumerable()
                          where (o.Field <int>(2) == 0 && o.Field <string>(1) == "Dashboard")
                          select o;
            int _idx = 0;

            foreach (var mod in _module)
            {
                if (_permission.Substring(_idx, 1) == "1")
                {
                    return(true);
                }
            }

            return(dashboard);
        }
Exemplo n.º 5
0
        protected void btncms_Click(object sender, EventArgs e)
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.uid       = (string)Session["uid"];
            Session["module"] = "CMS";
            _objcls.mode      = 2;
            if (_objbll.Module_Access(_objcls, _objdb) == true)
            {
                if ((string)Session["project"] == "CCAD")
                {
                    Populate_ObjectDataSource();
                }
                if ((string)Session["project"] == "14211" || (string)Session["project"] == "HMIM" || (string)Session["project"] == "HMHS")
                {
                    string _redirect = "CMS/CMS2.aspx?auh=" + (string)Session["uid"] + "&prj=" + (string)Session["project"] + "&mod=0";
                    ScriptManager.RegisterStartupScript(this, typeof(string), "close", "parent.location.replace('" + _redirect + "');", true);
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, typeof(string), "close", "parent.call(2,'" + (string)Session["project"] + "');", true);
                }
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, typeof(string), "", "alert('Access Denied');", true);
            }
        }
Exemplo n.º 6
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);
            }
        }
Exemplo n.º 7
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);
        }
Exemplo n.º 8
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);
        }
Exemplo n.º 9
0
        private void HideComment(int mode)
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.uid          = (string)Session["uid"];
            _objcls.project_code = lblprjid.Text;
            _objcls.mode         = mode;
            string _access = _objbll.Get_CMSAccess(_objcls, _objdb);
            string _user   = (string)Session["uid"];

            if (_user.Contains("cmlgroup") != true)
            {
                if (_access != "Review/Comments")
                {
                    mydiv.Visible   = false;
                    cmdsave.Visible = false;
                }
                else
                {
                    mydiv.Visible   = true;
                    cmdsave.Visible = true;
                }
            }
            else
            {
                mydiv.Visible   = true;
                cmdsave.Visible = true;
            }
        }
Exemplo n.º 10
0
        protected void load_user(string Project)
        {
            //ScriptManager.RegisterStartupScript(this, typeof(string), "", "alert('"+ (string)Session["project"] +"');", true);

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

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

            _objcls.project_code = Project;
            DataTable _dtable = _objbll.load_User(_objcls, _objdb);
            var       _result = from o in _dtable.AsEnumerable()
                                where o.Field <bool>(3) == true
                                select o;

            foreach (var row in _result)
            {
                ListItem _lst = new ListItem();
                _lst.Text  = row[0].ToString();
                _lst.Value = row[0].ToString();
                drprjuser.Items.Add(_lst);
            }
            drprjuser.Items.Insert(0, "<<Select User>>");
        }
        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);
            }
        }
Exemplo n.º 12
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);
        }
Exemplo n.º 13
0
        protected void LoadBuildingNames()
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();
            _clsuser  _objcls = new _clsuser();

            _objcls.project_code = (string)lblprj.Text;;
            _objdb.DBName        = "DB_" + lblprj.Text;
            DataTable dtBuildings = _objbll.Load_Buildings(_objcls, _objdb);

            if (tblAdd.Visible)
            {
                foreach (DataRow dr in dtBuildings.Rows)
                {
                    RadComboBoxItem cbBuildingItem = new RadComboBoxItem();
                    cbBuildingItem.Text  = dr["Build_Name"].ToString();
                    cbBuildingItem.Value = dr["Build_id"].ToString();
                    rcbBuilding.Items.Add(cbBuildingItem);
                }
                rcbBuilding.DataBind();
            }

            foreach (DataRow dr in dtBuildings.Rows)
            {
                RadComboBoxItem cbBuildingItem = new RadComboBoxItem();
                cbBuildingItem.Text  = dr["Build_Name"].ToString();
                cbBuildingItem.Value = dr["Build_id"].ToString();
                rcbBuilding_Edit.Items.Add(cbBuildingItem);
            }
            rcbBuilding_Edit.DataBind();
        }
        private void Get_ProjectDetails()
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.project_code = lblprj.Text;
            DataTable dt = _objbll.Get_ProjectInformation(_objcls, _objdb);

            string _location = "";

            foreach (DataRow dr in dt.Rows)
            {
                lblprojectprint.Text = dr["prj_name"].ToString();
                _location            = dr["Location"].ToString();
            }
            if (string.IsNullOrEmpty(_location))
            {
                lblcmlhead.Text = "CML International LLC";
            }
            else
            {
                lblcmlhead.Text = "CML International (" + _location + ") LLC";
            }
        }
Exemplo n.º 15
0
        private void Load_Project(string _mod)
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.uid = (string)Session["uid"];
            if (_mod == "CMS")
            {
                drproject.DataSource     = _objbll.Load_User_CMS_Projects(_objcls, _objdb);
                drproject.DataValueField = "prj_code";
                drproject.DataTextField  = "prj_name";
                drproject.DataBind();
            }
            else if (_mod == "DMS")
            {
                drproject.DataSource     = _objbll.Load_User_DMS_Projects(_objcls, _objdb);
                drproject.DataValueField = "prj_code";
                drproject.DataTextField  = "prj_name";
                drproject.DataBind();
            }
            // drproject.Items.Insert(0, "<< Select Project >>");
        }
        private void Setting(int type)
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();
            _clsuser  _objcls = new _clsuser();

            _objdb.DBName        = "DBCML";
            _objcls.project_code = lblprj.Text;
            string ProjectName = _objbll.Get_ProjectName(_objcls, _objdb);

            lbltitle.Text = ProjectName + " - Document Review Creation";
            if (type == 0)
            {
                lblpackage.Text   = (string)Session["service"];
                lblsubject.Text   = (string)Session["doc"];
                lblrecordby.Text  = (string)Session["uid"];
                lblsubmitted.Text = (string)Session["issued"];
                lblBuilding.Text  = (string)Session["bui"];
                lblissuedto.Text  = lblsubmitted.Text;
            }
            else
            {
                Load_DocReview_Info();
                Session["service"] = lblpackage.Text;
                Session["doc"]     = lblsubject.Text;
            }
        }
Exemplo n.º 17
0
        protected void cmdedit_Click(object sender, EventArgs e)
        {
            cmdcreate.Text = "Update user";
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.uid = userid.Text;
            DataTable _dtable = _objbll.load_projecthome(_objcls, _objdb);

            foreach (DataRow _item in _dtable.Rows)
            {
                for (int i = 0; i <= chkprj.Items.Count - 1; i++)
                {
                    if (chkprj.Items[i].Text == _item[1].ToString())
                    {
                        chkprj.Items[i].Selected = true;
                        chkprj.Items[i].Attributes.Add("Style", "background-color: blue;");
                    }
                }
                username.Text = _item[4].ToString();
            }
        }
Exemplo n.º 18
0
        private void Setting(int type)
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();
            _clsuser  _objcls = new _clsuser();

            _objdb.DBName        = "DBCML";
            _objcls.project_code = lblprj.Text;
            string ProjectName = _objbll.Get_ProjectName(_objcls, _objdb);

            //lbltitle.Text = ProjectName + " - Document Review Creation";
            if (type == 0)
            {
                lblpackage.Text   = (string)Session["service"];
                lblsubject.Text   = (string)Session["doc"];
                lblrecordby.Text  = (string)Session["uid"];
                lblsubmitted.Text = (string)Session["issued"];
                if (trBuilding.Visible && Request.QueryString["build"] != null && Request.QueryString["buildid"] != null)
                {
                    lblbuilding.Text = Request.QueryString["build"].ToString();
                    lblbuilding.Attributes.Add("buildid", Request.QueryString["buildid"].ToString());
                }
            }
            else
            {
                Load_SO_Info();
                Session["service"] = lblpackage.Text;
                Session["doc"]     = lblsubject.Text;
            }
        }
Exemplo n.º 19
0
        void load_users()
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.project_code = (string)Session["project"];
            string       project  = _objbll.Get_ProjectName(_objcls, _objdb);
            _clsdocument _objcls1 = new _clsdocument();

            _objcls1.project_code = (string)Session["project"];
            _objcls1.schid        = Convert.ToInt32(lblfolder.Text);
            DataTable _dt  = _objbll.load_dms_user_email(_objcls1, _objdb);
            var       list = from o in _dt.AsEnumerable()
                             select o;

            foreach (var row in list)
            {
                Send_Mail(row[0].ToString(), project);
            }
            //Send_Mail("*****@*****.**", project);
            //Send_Mail("*****@*****.**", project);
        }
Exemplo n.º 20
0
        protected void set_permission()
        {
            if (drprjuser.SelectedItem.Text == "<<Select User>>")
            {
                ScriptManager.RegisterStartupScript(this, typeof(string), "", "alert('Select User');", true);
                return;
            }
            if (draccess.SelectedItem.Text == "<<Select Access>>")
            {
                ScriptManager.RegisterStartupScript(this, typeof(string), "", "alert('Select User Access');", true);
                return;
            }
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.uid          = drprjuser.SelectedItem.Value;
            _objcls.access       = draccess.SelectedItem.Text;
            _objcls.permission   = permission();
            _objcls.project_code = Label1.Text;
            bool _notification = false;

            if (chknoti.Checked == true)
            {
                _notification = true;
            }
            _objcls.notification = _notification;
            _objbll.Set_User_Permission(_objcls, _objdb);
            ScriptManager.RegisterStartupScript(this, typeof(string), "", "alert('User Permissions are updated');", true);
        }
Exemplo n.º 21
0
        private void LoginFromEmail(string _prm)
        {
            string _project = _prm.Substring(3, _prm.IndexOf("M_") - 3);
            string _module  = _prm.Substring(_prm.IndexOf("M_") + 2);

            Session["project"] = _project;
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.project_code = _project;
            string _projectName = _objbll.Get_ProjectName(_objcls, _objdb);

            Session["projectname"] = _projectName;
            if (_project == "HMIM")
            {
                Response.Redirect("CMS/CMS2.aspx?" + Request.QueryString.ToString().Replace("&", "<>"));
            }
            else
            {
                Response.Redirect("CMS/CMS.aspx?id=" + _prm);
            }
        }
Exemplo n.º 22
0
        protected void btnenter_Click(object sender, EventArgs e)
        {
            string    _id     = rd_facility.SelectedValue;
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.uid       = (string)Session["uid"];
            Session["module"] = "CMS";
            _objcls.mode      = 2;
            if (_objbll.Module_Access(_objcls, _objdb) == true)
            {
                //if ((string)Session["project"] == "ASAO" || (string)Session["project"] == "Trial" || (string)Session["project"] == "CCAD")
                //    Populate_ObjectDataSource();
                //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "parent.call(2,'" + (string)Session["project"] + "');", true);
                string _redirect = "CMS/CMS2.aspx?auh=" + (string)Session["uid"] + "&prj=" + (string)Session["project"] + "&pkg=" + rd_package.SelectedItem.Text + "&fac=" + rd_facility.SelectedItem.Text;
                ScriptManager.RegisterStartupScript(this, typeof(string), "close", "parent.location.replace('" + _redirect + "');", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, typeof(string), "", "alert('Access Denied');", true);
            }
        }
        private void Permission()
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();
            _clsuser  _objcls = new _clsuser();

            _objdb.DBName        = "dbCML";
            _objcls.uid          = lbluser.Text;
            _objcls.project_code = lblprj.Text;
            //string _access = _objbll.Get_User_cmsAccess(_objcls, _objdb);
            lblpermission.Text = _objbll.Get_User_cmsAccess(_objcls, _objdb);

            if (lblpermission.Text != "Admin")
            {
                Load_FullSchedule();
                //ScriptManager.RegisterStartupScript(this, typeof(string), "close", "Changemenu(1);", true);
                m1.Visible = false;
                m2.Visible = false;
            }
            else
            {
                string _prm = lblprj.Text + "_S" + lblsch.Text + "_F" + facid.Text;
                if (lblsch.Text == "20")
                {
                    myframe1.Attributes.Add("src", "../Cassheet_DataEntry_BMS.aspx?id=" + _prm);
                }
                else
                {
                    myframe1.Attributes.Add("src", "../Cassheet_DataEntry.aspx?id=" + _prm);
                }
                //myframe1.Attributes.Add("src", "../CasDataEntry_New.aspx?id=" + _prm);
            }
        }
Exemplo n.º 24
0
        private string get_project()
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _clsuser  _objcls = new _clsuser();
            _database _objdb  = new _database();

            _objdb.DBName        = "DBCML";
            _objcls.project_code = lblprj.Text;
            return(_objbll.Get_ProjectName(_objcls, _objdb));
        }
Exemplo n.º 25
0
        private void Populate_Ms_Folder()
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();
            _clsuser  _objcls = new _clsuser();

            _objdb.DBName        = "dbCML";
            _objcls.uid          = (string)Session["uid"];
            _objcls.project_code = (string)Session["project"];
            string _permission = _objbll.Get_User_Permission(_objcls, _objdb);

            _objdb.DBName = "DB_" + (string)Session["project"];
            DataTable _dtser   = _objbll.Load_Prj_Service_MS(_objdb);
            DataTable _dtsys   = _objbll.Load_Prj_MsSystem(_objdb);
            DataTable _dttype  = _objbll.Load_Prj_MsType(_objdb);
            var       _service = from o in _dtser.AsEnumerable()
                                 select o;

            foreach (var ser in _service)
            {
                TreeNode _n1 = new TreeNode();
                _n1.Text         = ser[1].ToString();
                _n1.Value        = ser[0].ToString();
                _n1.SelectAction = TreeNodeSelectAction.Expand;
                string _prm = "0_T0_S" + ser[0].ToString();
                _prm            = _prm.Replace("&", "^");
                _n1.NavigateUrl = "javascript:Load2('" + _prm + "')";
                mytree.Nodes.Add(_n1);
                var _system = from o in _dtsys.AsEnumerable()
                              where o.Field <int>(3) == Convert.ToInt32(ser[0].ToString())
                              select o;
                foreach (var sys in _system)
                {
                    TreeNode _n2 = new TreeNode();
                    _n2.Text         = sys[2].ToString();
                    _n2.Value        = sys[0].ToString();
                    _n2.SelectAction = TreeNodeSelectAction.Expand;
                    _prm             = sys[0].ToString() + "_T" + sys[2].ToString() + "_S" + ser[0].ToString();
                    _prm             = _prm.Replace("&", "^");
                    _n2.NavigateUrl  = "javascript:Load2('" + _prm + "')";
                    _n1.ChildNodes.Add(_n2);
                    var _type = from o in _dttype.AsEnumerable()
                                select o;
                    foreach (var typ in _type)
                    {
                        TreeNode _n3 = new TreeNode();
                        _n3.Text  = typ[1].ToString();
                        _n3.Value = typ[0].ToString();
                        //_n5.NavigateUrl = "javascript:parent.callcms('" + _prm + "','4')";
                        _n2.ChildNodes.Add(_n3);
                    }
                }
            }
            mytree.CollapseAll();
        }
Exemplo n.º 26
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);
        }
        private void Get_ProjectName()
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.project_code = lblprj.Text;
            prj.Text             = _objbll.Get_ProjectName(_objcls, _objdb);
        }
Exemplo n.º 28
0
        private void GetAccess()
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.uid    = lblid.Text;
            lblaccess.Text = _objbll.GetUserAccess(_objcls, _objdb);
        }
Exemplo n.º 29
0
        private void Load_Schedule()
        {
            BLL_Dml   _objbll = new BLL_Dml();
            _database _objdb  = new _database();

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

            _objcls.project_code = (string)Session["project"];
            _dtable = _objbll.load_schedule(_objcls, _objdb);
        }
Exemplo n.º 30
0
        void Load_ProjectHome()
        {
            //btnDummy.Style.Add("display", "none");
            BLL_Dml  _objbll = new BLL_Dml();
            _clsuser _objcls = new _clsuser();

            _objcls.uid = (string)Session["uid"];
            //myprojectgrid.DataSource = _objbll.load_projecthome(_objcls);
            //myprojectgrid.DataBind();
            //userinfo.Text = "Login as: " + publicCls.publicCls._user + " Time: " + publicCls.publicCls._logintime + " ";
        }