예제 #1
0
        private void lbl_ReciveREfrenceLetter_Click(object sender, EventArgs e)
        {
            var query  = (from u in DBCommon.Context.UserAccess where u.UserID == PublicVariebale.gUserID where u.SystemPartID == 18 select u);
            var result = query.ToList();

            if (result.Count > 0)
            {
                formclosing();
                FormNumber = 20;
                fm_rr      = new Frm_ReciveRefrenceLEtter();
                fm_rr.Show();
                // fm_sd.MdiParent = this;
                fm_rr.TopMost = true;
            }
            else
            {
                lbl_ReciveREfrenceLetter.Text = "شما به این بخش دسترسی ندارید";
            }
        }
예제 #2
0
 private void formclosing()
 {
     if (FormNumber == 7)
     {
         fm_sr = new Frm_ShowRememebr();
         fm_sr.Close();
     }
     if (FormNumber == 14)
     {
         fm_ar = new Frm_AddRememeber();
         fm_ar.Close();
     }
     if (FormNumber == 15)
     {
         fm_sd = new Frm_ShowDrafts();
         fm_sd.Close();
     }
     if (FormNumber == 12)
     {
         //fm_cl = new Frm_CreateLetter();
         //fm_cl.Close();
     }
     if (FormNumber == 1)
     {
         fm_rl = new Frm_ReciveLetter();
         fm_rl.Close();
     }
     if (FormNumber == 8)
     {
         fm_sl = new Frm_SendLetter();
         fm_sl.Close();
     }
     if (FormNumber == 13)
     {
         fm_cn = new Frm_CrateNote();
         fm_cn.Close();
     }
     if (FormNumber == 10)
     {
         fm_ss = new Frm_ShowSendNote();
         fm_ss.Close();
     }
     if (FormNumber == 6)
     {
         fm_rn = new Frm_ReciveNote();
         fm_rn.Close();
     }
     if (FormNumber == 3)
     {
         fm_un = new Frm_UnReadLetter();
         fm_un.Close();
     }
     if (FormNumber == 2)
     {
         fm_rel = new Frm_ReadLetter();
         fm_rel.Close();
     }
     if (FormNumber == 4)
     {
         fm_sf2 = new ShowletterForce2();
         fm_sf2.Close();
     }
     if (FormNumber == 5)
     {
         fm_st = new Frm_Security2();
         fm_st.Close();
     }
     if (FormNumber == 16)
     {
         fm_sa = new Frm_ShowNewsForAllUser();
         fm_sa.Close();
     }
     if (FormNumber == 11)
     {
         fm_srl = new SendRefrenceLetter();
         fm_srl.Close();
     }
     if (FormNumber == 20)
     {
         fm_rr = new Frm_ReciveRefrenceLEtter();
         fm_rr.Close();
     }
 }