Esempio n. 1
0
		///<summary></summary>
		public static void Delete(LanguageForeign lanf){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),lanf);
				return;
			}
			Crud.LanguageForeignCrud.Delete(lanf.LanguageForeignNum);
		}
		///<summary>lanForeign might be null.</summary>
		public FormTranslationEdit(Language lanCur,LanguageForeign lanForeign,string otherTrans){
			InitializeComponent();
			//no need to translate anything here
			LanCur=lanCur;
			LanForeign=lanForeign;
			OtherTrans=otherTrans;
		}
Esempio n. 3
0
 ///<summary></summary>
 public static long Insert(LanguageForeign lanf)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         return(Meth.GetLong(MethodBase.GetCurrentMethod(), lanf));
     }
     return(Crud.LanguageForeignCrud.Insert(lanf));
 }
Esempio n. 4
0
 ///<summary></summary>
 public static void Delete(LanguageForeign lanf)
 {
     if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
     {
         Meth.GetVoid(MethodBase.GetCurrentMethod(), lanf);
         return;
     }
     Crud.LanguageForeignCrud.Delete(lanf.LanguageForeignNum);
 }
        ///<summary></summary>
        public LanguageForeign Copy()
        {
            LanguageForeign l = new LanguageForeign();

            l.ClassType   = ClassType;
            l.English     = English;
            l.Culture     = Culture;
            l.Translation = Translation;
            l.Comments    = Comments;
            return(l);
        }
Esempio n. 6
0
		///<summary></summary>
		public static long Insert(LanguageForeign lanf){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				return Meth.GetLong(MethodBase.GetCurrentMethod(),lanf);
			}
			return Crud.LanguageForeignCrud.Insert(lanf);
		}
Esempio n. 7
0
		///<summary>Used in FormTranslation to get a single entry with the same language as the specified culture, but only for a different culture.  For instance, if culture is es-PR (Spanish-PuertoRico), then it will return any spanish translation that is NOT from Puerto Rico.  If no other translation entries, then it returns null.</summary>
		public static LanguageForeign GetOther(LanguageForeign[] listForType,string english,string cultureName){
			//No need to check RemotingRole; no call to db.
			for(int i=0;i<listForType.Length;i++){
				if(english!=listForType[i].English){
					continue;
				}
				if(cultureName==listForType[i].Culture){
					continue;
				}
				if(cultureName.Substring(0,2)!=listForType[i].Culture.Substring(0,2)){
					continue;
				}
				return listForType[i];
			}
			return null;
		}
		private void FormTranslationEdit_Load(object sender, System.EventArgs e){
			textEnglish.Text=LanCur.English;
			textOtherTranslation.Text=OtherTrans;
			if(LanForeign==null){
				LanForeign=new LanguageForeign();
				LanForeign.ClassType=LanCur.ClassType;
				LanForeign.English=LanCur.English;
				LanForeign.Culture=CultureInfo.CurrentCulture.Name;
				Text="Add Translation";
				IsNew=true;
			}
			else{
				//LanguageForeigns.Cur=((LanguageForeign)LanguageForeigns.HList[Lan.Cur.ClassType+Lan.Cur.English]);
				textTranslation.Text=LanForeign.Translation;
				textComments.Text=LanForeign.Comments;
				Text="Edit Translation";
				IsNew=false;
			}
		}