Exemplo n.º 1
0
        protected void grdListOfApplication_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            //int ID = int.Parse(e.CommandArgument.ToString());


            if (e.CommandName == "Select")
            {
                Guid        ID    = Guid.Parse(e.CommandArgument.ToString());
                GridViewRow row   = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
                int         index = row.RowIndex;
                MDMSVC.DC_ApplicationMgmt _obj = new MDMSVC.DC_ApplicationMgmt();
                _obj.ApplicationId   = ID;
                _obj.ApplicationName = System.Web.HttpUtility.HtmlDecode(grdListOfApplication.Rows[index].Cells[1].Text);
                _obj.Description     = System.Web.HttpUtility.HtmlDecode(grdListOfApplication.Rows[index].Cells[2].Text);
                List <MDMSVC.DC_ApplicationMgmt> apmgmt = new List <MDMSVC.DC_ApplicationMgmt>();
                apmgmt.Add(_obj);
                frmApplicationdetail.ChangeMode(FormViewMode.Edit);
                frmApplicationdetail.DataSource = apmgmt;
                frmApplicationdetail.DataBind();
                TextBox txtApplicationName = (TextBox)frmApplicationdetail.FindControl("txtApplicationName");
                TextBox txtDescription     = (TextBox)frmApplicationdetail.FindControl("txtDescription");
                txtApplicationName.Text = _obj.ApplicationName;
                txtDescription.Text     = _obj.Description;
            }
        }
Exemplo n.º 2
0
        public MDMSVC.DC_Message AddUpdateApplication(MDMSVC.DC_ApplicationMgmt apmgmt)
        {
            object result = null;

            ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Admin_Application_AddUpdate"], apmgmt, typeof(MDMSVC.DC_ApplicationMgmt), typeof(MDMSVC.DC_Message), out result);
            return(result as MDMSVC.DC_Message);
        }
Exemplo n.º 3
0
        protected void frmApplicationdetail_ItemCommand(object sender, FormViewCommandEventArgs e)
        {
            // get the textbox value and use it to create a new record in Project
            TextBox txtApplicationName = (TextBox)frmApplicationdetail.FindControl("txtApplicationName");
            TextBox txtDescription     = (TextBox)frmApplicationdetail.FindControl("txtDescription");

            MDMSVC.DC_ApplicationMgmt _obj = new MDMSVC.DC_ApplicationMgmt();
            if (e.CommandName == "Edit")
            {
                Guid myRow_Id = Guid.Parse(grdListOfApplication.SelectedDataKey.Value.ToString());
                _obj.ApplicationId   = myRow_Id;
                _obj.ApplicationName = txtApplicationName.Text;
                _obj.Description     = txtDescription.Text;
            }
            else if (e.CommandName == "Add")
            {
                _obj.ApplicationId   = Guid.NewGuid();
                _obj.ApplicationName = txtApplicationName.Text;
                _obj.Description     = txtDescription.Text;
            }
            _msg = _objAdminSVCs.AddUpdateApplication(_obj);
            if ((BootstrapAlertType)Convert.ToInt32(_msg.StatusCode) == BootstrapAlertType.Warning)
            {
                hdnFlag.Value = "false";
                BootstrapAlert.BootstrapAlertMessage(msgAlert, _msg.StatusMessage, (BootstrapAlertType)Convert.ToInt32(_msg.StatusCode));
            }
            else
            {
                frmApplicationdetail.ChangeMode(FormViewMode.Insert);
                frmApplicationdetail.DataBind();
                msgAlert.Attributes.Add("display", "none");
                hdnFlag.Value = "true";
                BindApplicationDetails(intPageIndex);
                BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)Convert.ToInt32(_msg.StatusCode));
            }
        }