Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            iFamilyInfo = (IFamilyInfo)ServiceAgent.getInstance().GetMaintainObjectByName<IFamilyInfo>(WebConstant.IFAMILYINFOObject);

            if (!this.IsPostBack)
            {
                pmtMessage1 = this.GetLocalResourceObject(Pre + "_pmtMessage1").ToString() + "!";
                pmtMessage2 = this.GetLocalResourceObject(Pre + "_pmtMessage2").ToString() + "!";
                pmtMessage3 = this.GetLocalResourceObject(Pre + "_pmtMessage3").ToString() + "!";
                pmtMessage4 = this.GetLocalResourceObject(Pre + "_pmtMessage4").ToString() + "!";
                pmtMessage5 = this.GetLocalResourceObject(Pre + "_pmtMessage5").ToString() + "!";
                pmtMessage6 = this.GetLocalResourceObject(Pre + "_pmtMessage6").ToString() + "!";
                pmtMessage8 = this.GetLocalResourceObject(Pre + "_pmtMessage8").ToString() + "!";
                pmtMessage9 = this.GetLocalResourceObject(Pre + "_pmtMessage9").ToString() + "!";
                pmtMessage10 = this.GetLocalResourceObject(Pre + "_pmtMessage10").ToString() + "!";
                pmtMessage11 = this.GetLocalResourceObject(Pre + "_pmtMessage11").ToString() + "!";
                pmtMessage12 = this.GetLocalResourceObject(Pre + "_pmtMessage12").ToString() + "!";
                pmtMessage13 = this.GetLocalResourceObject(Pre + "_pmtMessage13").ToString() + "!";
                pmtMessage14 = this.GetLocalResourceObject(Pre + "_pmtMessage14").ToString() + "!";
                pmtMessage15 = this.GetLocalResourceObject(Pre + "_pmtMessage15").ToString() + "!";
                pmtMessage16 = this.GetLocalResourceObject(Pre + "_pmtMessage16").ToString();
                userName = Master.userInfo.UserId; //UserInfo.UserName;
                this.hiddenUserName.Value = userName;
                initLabel();
                initCmbFamilyInfoName();
                ShowFamilyInfo();
            }
            //ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "", "", true);

        }
        catch (FisException ex)
        {
            ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "DealHideWait", "DealHideWait();", true);
            showErrorMessage(ex.mErrmsg);
        }
        catch (Exception ex)
        {
            ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "DealHideWait", "DealHideWait();", true);
            showErrorMessage(ex.Message);
        }
    }
Esempio n. 2
0
        private void BindFamilyGrid()
        {
            IFamilyInfo PatientFamilyInfo = (IFamilyInfo)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BFamilyInfo, BusinessProcess.Clinical");
            DataSet     theDS             = PatientFamilyInfo.GetAllFamilyData(Convert.ToInt32(Session["PatientId"]));

            //BoundField theCol0 = new BoundField();
            //theCol0.HeaderText = "Id";
            //theCol0.DataField = "Id";
            //theCol0.ItemStyle.CssClass = "textstyle";
            //ucFamily.grdFamily.Columns.Add(theCol0);

            //BoundField theCol1 = new BoundField();
            //theCol1.HeaderText = "Patientid";
            //theCol1.DataField = "ptn_pk";
            //theCol1.ItemStyle.CssClass = "textstyle";
            //ucFamily.grdFamily.Columns.Add(theCol1);

            //BoundField theCol2 = new BoundField();
            //theCol2.HeaderText = "Last Name";
            //theCol2.DataField = "RLastName";
            //theCol2.SortExpression = "RLastName";
            //theCol2.ItemStyle.CssClass = "textstyle";
            //theCol2.ReadOnly = true;
            //ucFamily.grdFamily.Columns.Add(theCol2);

            //BoundField theCol3 = new BoundField();
            //theCol3.HeaderText = "First Name";
            //theCol3.DataField = "RFirstName";
            //theCol3.ItemStyle.CssClass = "textstyle";
            //theCol3.SortExpression = "RFirstName";
            //theCol3.ReadOnly = true;
            //ucFamily.grdFamily.Columns.Add(theCol3);

            ////"Existing Hosp/Clinic #";//"Enrollment No.";
            //BoundField theCol4 = new BoundField();
            ////if (((DataTable)ViewState["grdDataSource"]).Rows.Count > 0)
            ////{
            ////    theCol4.HeaderText = ((DataTable)ViewState["grdDataSource"]).Rows[1][0].ToString().Trim();
            ////}
            //theCol4.HeaderText = "Registration No";
            //theCol4.ItemStyle.CssClass = "textstyle";
            //theCol4.DataField = "RegistrationNo";
            //theCol4.SortExpression = "RegistrationNo";
            //theCol4.ReadOnly = true;
            //ucFamily.grdFamily.Columns.Add(theCol4);

            //////"Existing Hosp/Clinic #";
            ////BoundField theCol5 = new BoundField();
            ////if (((DataTable)ViewState["grdDataSource"]).Rows.Count > 0)
            ////{
            ////    theCol5.HeaderText = ((DataTable)ViewState["grdDataSource"]).Rows[0][0].ToString().Trim();
            ////}
            ////theCol5.ItemStyle.CssClass = "textstyle";
            ////theCol5.DataField = "FileNo";
            ////theCol5.SortExpression = "FileNo";
            ////theCol5.ReadOnly = true;
            ////ucFamily.grdFamily.Columns.Add(theCol5);

            //BoundField theCol6 = new BoundField();
            //theCol6.HeaderText = "Registered?";
            //theCol6.ItemStyle.CssClass = "textstyle";
            //theCol6.DataField = "Registered?";
            //theCol6.SortExpression = "Registered?";
            //theCol6.ReadOnly = true;
            //ucFamily.grdFamily.Columns.Add(theCol6);

            //BoundField theCol7 = new BoundField(); // double
            //theCol7.HeaderText = "RelationshipTypeId";
            //theCol7.DataField = "RelationshipTypeId";
            //theCol7.ItemStyle.CssClass = "textstyle";
            //ucFamily.grdFamily.Columns.Add(theCol7);


            //BoundField theCol8 = new BoundField();
            //theCol8.HeaderText = "Relationship";
            //theCol8.DataField = "RelationshipTypeDesc";
            //theCol8.ItemStyle.CssClass = "textstyle";
            //theCol8.SortExpression = "RelationshipTypeDesc";
            //theCol8.ReadOnly = true;
            //ucFamily.grdFamily.Columns.Add(theCol8);


            //BoundField theCol8_1 = new BoundField();
            //theCol8_1.HeaderText = "Relationship Date";
            //theCol8_1.DataField = "RelationshipDate";
            ////theCol8_1.DataField = String.Format("{0:dd-MMM-yyyy}", theCol8_1.DataField);
            //theCol8_1.ItemStyle.CssClass = "textstyle";
            //theCol8_1.SortExpression = "RelationshipDate";
            //ucFamily.grdFamily.Columns.Add(theCol8_1);


            //BoundField theCol9 = new BoundField();
            //theCol9.HeaderText = "SexId";
            //theCol9.ItemStyle.CssClass = "textstyle";
            //theCol9.DataField = "SexId";
            //theCol9.ReadOnly = true;
            //ucFamily.grdFamily.Columns.Add(theCol9);

            //BoundField theCol10 = new BoundField();
            //theCol10.HeaderText = "Sex";
            //theCol10.DataField = "SexDesc";
            //theCol10.ItemStyle.CssClass = "textstyle";
            //theCol10.SortExpression = "SexDesc";
            //ucFamily.grdFamily.Columns.Add(theCol10);

            //BoundField theCol11 = new BoundField();
            //theCol11.HeaderText = "Age(yrs)";
            //theCol11.ItemStyle.CssClass = "textstyle";
            //theCol11.DataField = "AgeYear";
            //theCol11.SortExpression = "AgeYear";
            //theCol11.ReadOnly = true;
            //ucFamily.grdFamily.Columns.Add(theCol11);

            //BoundField theCol12 = new BoundField();
            //theCol12.HeaderText = "Age(mths)";
            //theCol12.ItemStyle.CssClass = "textstyle";
            //theCol12.DataField = "AgeMonth";
            //theCol12.SortExpression = "AgeMonth";
            //theCol12.ReadOnly = true;
            //ucFamily.grdFamily.Columns.Add(theCol12);

            //BoundField theCol13 = new BoundField();
            //theCol13.HeaderText = "HivStatusId";
            //theCol13.DataField = "HivStatusId";
            //theCol13.ItemStyle.CssClass = "textstyle";
            //ucFamily.grdFamily.Columns.Add(theCol13);

            //BoundField theCol14 = new BoundField();
            //theCol14.HeaderText = "HIVStatus";
            //theCol14.ItemStyle.CssClass = "textstyle";
            //theCol14.DataField = "HivStatusDesc";
            //theCol14.SortExpression = "HivStatusDesc";
            //theCol14.ReadOnly = true;
            //ucFamily.grdFamily.Columns.Add(theCol14);

            //BoundField theCol14_1 = new BoundField();
            //theCol14_1.HeaderText = "Last HIV Test Date";
            //theCol14_1.DataField = "LastHIVTestDate";
            ////theCol4_1.DataField = String.Format("{0:dd-MMM-yyyy}", theCol8_1.DataField);
            //theCol14_1.ItemStyle.CssClass = "textstyle";
            //theCol14_1.SortExpression = "LastHIVTestDate";
            //ucFamily.grdFamily.Columns.Add(theCol14_1);

            //BoundField theCol15 = new BoundField();
            //theCol15.HeaderText = "HIVCareStatusId";
            //theCol15.DataField = "HIVCareStatusId";
            //theCol15.ItemStyle.CssClass = "textstyle";
            //ucFamily.grdFamily.Columns.Add(theCol15);

            //BoundField theCol16 = new BoundField();
            //theCol16.HeaderText = "HIVCareStatus";
            //theCol16.DataField = "HivCareStatusDesc";
            //theCol16.ItemStyle.CssClass = "textstyle";
            //theCol16.SortExpression = "HivCareStatusDesc";
            //theCol16.ReadOnly = true;
            //ucFamily.grdFamily.Columns.Add(theCol16);

            ////ButtonField theBtn = new ButtonField();
            ////theBtn.ButtonType = ButtonType.Image;
            ////theBtn.HeaderText = "Delete";
            ////theBtn.CommandName = "Remove";
            ////theBtn.ImageUrl= "../Images/del.gif";
            //////theBtn.HeaderText = "Remove";
            ////ucFamily.grdFamily.Columns.Add(theBtn);

            ////if (Authentiaction.HasFunctionRight(ApplicationAccess.FamilyInfo, FunctionAccess.Delete, (DataTable)Session["UserRight"]) == true && Session["lblpntstatus"].ToString() != "1")
            ////{
            ////CommandField objfield = new CommandField();
            ////objfield.ButtonType = ButtonType.Link;
            ////objfield.DeleteText = "<img src='../Images/del.gif' alt='Delete this' border='0' />";
            ////objfield.ShowDeleteButton = true;
            ////ucFamily.grdFamily.Columns.Add(objfield);

            ////}

            ucFamily.grdFamily.DataSource = theDS.Tables[0];
            ucFamily.grdFamily.DataBind();
            ucFamily.grdFamily.Columns[0].Visible  = false;
            ucFamily.grdFamily.Columns[1].Visible  = false;
            ucFamily.grdFamily.Columns[7].Visible  = false;
            ucFamily.grdFamily.Columns[10].Visible = false;
            ucFamily.grdFamily.Columns[14].Visible = false;
            ucFamily.grdFamily.Columns[17].Visible = false;
        }