Exemplo n.º 1
0
 private void bindinggrid(bool bIsSave)
 {
     try
     {
         DataTable dt = clsPrjObj.fnGetProjectDetails(Common.iUserID);
         dt.Columns.Add(new DataColumn("Select", typeof(bool)));
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             dt.Rows[i]["Select"] = false;
         }
         grdProject.DataSource                      = dt;
         grdProject.AllowAddNewRow                  = false;
         grdProject.ShowRowHeaderColumn             = false;
         grdProject.EnableGrouping                  = false;
         grdProject.ShowFilteringRow                = false;
         grdProject.AutoSizeRows                    = false;
         grdProject.Columns["Project_Id"].IsVisible = false;
         for (int i = 0; i < dt.Columns.Count - 1; i++)
         {
             grdProject.MasterTemplate.Columns[i].ReadOnly = true;
         }
         grdProject.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
         if (bIsSave == false)
         {
             grdProject.ValueChanged += new EventHandler(grdProject_ValueChanged);
         }
     }
     catch (Exception ex)
     {
         Telerik.WinControls.RadMessageBox.Show(this, ex.Message, ex.TargetSite.Name.ToString(), MessageBoxButtons.OK, RadMessageIcon.Error, MessageBoxDefaultButton.Button1);
     }
 }
Exemplo n.º 2
0
 private void fnMapProjectDetails()
 {
     if (Common.iProjectID != 0)
     {
         clsProjects clsPObj = new clsProjects();
         DataTable   dt      = clsPObj.fnGetProjectDetails(Common.iProjectID);
         if (dt.Rows.Count > 0)
         {
             lblCreatedBy.Text   = "Created By : " + dt.Rows[0]["UName"];
             lblProjectName.Text = "Project Name : " + dt.Rows[0]["Name"];
             lblCreatedDate.Text = "Created On : " + dt.Rows[0]["CREATEDON"];
         }
     }
     else
     {
         fnShowProjects(false);
     }
 }