Exemplo n.º 1
0
        private void setUniversityInformation()
        {
            string    addressFooterFormat = "نشانی: {0}   تلفن تماس:{1}   کد پستی:{2}";
            DataTable dtSarparast         = bsn.getSignature(0, (int)DTO.RoleEnums.سرپرست_واحد);

            if (dtSarparast.Rows.Count == 1)
            {
                lblAgentName.Text = dtSarparast.Rows[0]["displayName"].ToString();
            }



            DataTable dt = commonBSN.getBasicInformation((int)DTO.basicType.آدرس, 1);

            if (dt.Rows.Count > 0)
            {
                if (dt.Rows[0]["value"] != DBNull.Value)
                {
                    lblUniversityAddress.Text = dt.Rows[0]["value"].ToString();
                }
            }


            dt = commonBSN.getBasicInformation((int)DTO.basicType.تلفن, 1);
            if (dt.Rows.Count > 0 && dt.Rows[0]["value"] != DBNull.Value)
            {
                lblUniversityPhone.Text = dt.Rows[0]["value"].ToString();
            }



            dt = commonBSN.getBasicInformation((int)DTO.basicType.ثبت, 1);
            if (dt.Rows.Count > 0 && dt.Rows[0]["value"] != DBNull.Value)
            {
                lblUniversityRegNo.Text = dt.Rows[0]["value"].ToString();
            }



            dt = commonBSN.getBasicInformation((int)DTO.basicType.کدپستی, 1);
            if (dt.Rows.Count > 0 && dt.Rows[0]["value"] != DBNull.Value)
            {
                lblUniversityPostalCode.Text = dt.Rows[0]["value"].ToString();
            }
            //writeLog("term:" + term);
            dt = commonBSN.getEducationCalender(term);
            //writeLog("dt.Rows.Count:" + dt.Rows.Count+ " , dt.Columns.Count:"+ dt.Columns.Count);

            DataRow[] dr = dt.Select("CalenderType=13");
            if (dr.Length == 1)
            {
                lblFromDate.Text = dr[0]["startdate"].ToString();
                lblToDate.Text   = dr[0]["enddate"].ToString();
            }
            lblAddressFooter.Text = string.Format(addressFooterFormat, lblUniversityAddress.Text, lblUniversityPhone.Text, lblUniversityPostalCode.Text);
        }