예제 #1
0
 public void Show(DataTable DT, decimal Archive_ID)
 {
     radGridViewSelected.DataSource = null;
     tempTable.Rows.Clear();
     foreach (DataRow item in DT.Rows)
     {
         if ((decimal)item["Archive_ID"] == Archive_ID)
         {
             tempTable.Rows.Add(null, null, null, null, null, null, null
                                , ItemsPublic.GetPersianDate((DateTime)item["Time"])
                                , ItemsPublic.GetPersianHour((DateTime)item["Time"]));
         }
     }
     radGridViewSelected.DataSource = tempTable;
     radGridViewSelected.Refresh();
 }
예제 #2
0
        private void frm_BlockPerson_Load(object sender, EventArgs e)
        {
            if (currentIsBlack == true)
            {
                uC_BlackListDetails1.rgbBlackList.Text = "جهت عادی کردن وضعیت فرد انتخابی";
            }
            else if (currentIsBlack == false)
            {
                uC_BlackListDetails1.rgbBlackList.Text = "جهت مسدود کردن فرد انتخابی";
            }
            else
            {
                ItemsPublic.Exeptor("وضعیت جاری نا مشخص می باشد");
            }
            uC_BlackListDetails1.SetAllTypeBLReasons();
            OutputDatas result = new OutputDatas();

            result = objManager.View_blackLists(currentPersonId);
            if (!result.success)
            {
                ItemsPublic.ShowMessage(result.Message);
                return;
            }
            radGridView1.DataSource = result.ResultTable;
            for (int i = 0; i < radGridView1.Rows.Count(); i++)
            {
                var str    = radGridView1.Rows [i].Cells ["BlackList_DateTime"].Value.ToString().Trim();
                var dtItem = DateTime.Parse(str);
                //	MessageBox.Show ( result.ResultTable.Rows [i] ["BlackList_DateTime"].ToString() );
                //	MessageBox.Show ("item:  "+ dtItem.ToString() );
                radGridView1.Rows [i].Cells ["BlackList_dtFarsiLabel"].Value = ItemsPublic.GetPersianDate(dtItem);
                radGridView1.Rows[i].Cells["BlackList_isBalckLabel"].Value   =
                    ( bool )radGridView1.Rows [i].Cells ["BlackList_isBlack"].Value ? "مسدود" : "عادی";

                //radGridView1.Rows[i].Cells["BLReason_Desc"].Value =
            }
        }