/// <summary>
        /// ارسال نهایی نامه به رده بالاتر توسط رییس گروهها
        /// </summary>
        /// <param name="L"></param>
        /// <returns>شی نامه</returns>
        public Boolean Send(Letter L, int senderId)
        {
            Boolean b = false;

            DB.ExecuteSQL("insert into tLetters(LDate,LSubject,LBody,LSenderID,LRecieverID,LParaf,LDelFlag,LState,LDay,LMonth,LYear) values(N'" + MilladiToShamc.ToSahmcDate() + "',N'" + L.Subject + "',N'" + L.Body + "'," + L.SenderID + "," + L.RecieverID + ",N'-',0,N'" + L.State + "'," + MilladiToShamc.ToSahmcDay() + "," + MilladiToShamc.ToSahmcMonth() + "," + MilladiToShamc.ToSahmcYear() + ")");
            int letterID = int.Parse(DB.ExecuteSelectSQL("select * from tLetters order by LID desc").Rows[0]["LID"].ToString());

            DB.ExecuteSQL("insert into tLettersAction(SL_UserID,SL_LID,SL_Archive,SL_Read,SL_Send,SL_Recieve,SL_PreWrite) values(" + senderId + "," + letterID + ",0,0,1,0," + L.PishnevisFlag + ")");

            //font setting
            DB.ExecuteSQL("insert into tFontLetter(TFAlignment,TFColor,TFStyle,TFLeftToRight,TFFontFamily,TFLID,TFSize)"
                          + " values(N'" + FontSetting.alignmen + "',N'" + FontSetting.color + "',N'" + FontSetting.style + "',N'" + FontSetting.leftToRight + "',N'" + FontSetting.fontFamily + "'," + letterID + "," + FontSetting.fontSize + ")");

            return(b);
        }
Exemple #2
0
    public static string ShowDateFarsi()
    {
        string Date = "";

        Date += MilladiToShamc.ToSahmcDay() + " ";
        switch (MilladiToShamc.ToSahmcMonth())
        {
        case "1":
        {
            Date += "فروردین ";
            break;
        }

        case "2":
        {
            Date += "اردیبهشت ";
            break;
        }

        case "3":
        {
            Date += "خرداد ";
            break;
        }

        case "4":
        {
            Date += "تیر ";
            break;
        }

        case "5":
        {
            Date += "مرداد ";
            break;
        }

        case "6":
        {
            Date += "شهریور ";
            break;
        }

        case "7":
        {
            Date += "مهر ";
            break;
        }

        case "8":
        {
            Date += "آبان ";
            break;
        }

        case "9":
        {
            Date += "آذر ";
            break;
        }

        case "10":
        {
            Date += "دی ";
            break;
        }

        case "11":
        {
            Date += "بهمن ";
            break;
        }

        case "12":
        {
            Date += "اسفند ";
            break;
        }

        default:
            break;
        }
        Date += MilladiToShamc.ToSahmcYear();
        return(Date);
    }