예제 #1
0
 /// <summary>
 /// 发布数据取得
 /// </summary>
 private void getPublishData()
 {
     if (db.GetMediaPublishVW(0, 0, "*", "MediaType='" + provider_type.ToString() + "' AND 发行状态='未发行'", "", ref ds_media) &&
         ds_media.Tables[0].Rows.Count > 0)
     {
         CurrentIndex  = 1;
         lblNum.Text   = Convert.ToString(CurrentIndex) + "/" + Convert.ToString(ds_media.Tables[0].Rows.Count);
         txtTitle.Text = ds_media.Tables[0].Rows[CurrentIndex - 1]["名称"].ToString()
                         + ds_media.Tables[0].Rows[CurrentIndex - 1]["发行期号"].ToString()
                         + "[" + ds_media.Tables[0].Rows[CurrentIndex - 1]["发行日期"].ToString() + "]";
         txtMessage.Text     = ds_media.Tables[0].Rows[CurrentIndex - 1]["文本内容"].ToString();
         txtPicturePath.Text = ds_media.Tables[0].Rows[CurrentIndex - 1]["本地图片"].ToString();
         if (File.Exists(txtPicturePath.Text))
         {
             pbCover.Image = new Bitmap(txtPicturePath.Text);
         }
         else
         {
             if (pbCover.Image != null)
             {
                 pbCover.Image.Dispose();
             }
         }
         btnPrev.Enabled = false;
         if (CurrentIndex < ds_media.Tables[0].Rows.Count)
         {
             btnNext.Enabled = true;
         }
         else
         {
             btnNext.Enabled = false;
         }
         btnPost.Enabled = true;
     }
     else
     {
         btnNext.Enabled = false;
         btnPrev.Enabled = false;
         btnPost.Enabled = false;
     }
 }
예제 #2
0
 public static string InvalidConnectionUsed(PROVIDER_TYPE providerType)
 {
     return "There is no active connection with " + providerType.ToString();
 }
예제 #3
0
 public static string InvalidConnectionUsed(PROVIDER_TYPE providerType)
 {
     return("There is no active connection with " + providerType.ToString());
 }