refactoring
This commit is contained in:
@ -115,6 +115,7 @@ namespace Yavsc.ApiControllers
|
|||||||
))};
|
))};
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
|
|
||||||
return new HttpResponseMessage (HttpStatusCode.OK){ Content =
|
return new HttpResponseMessage (HttpStatusCode.OK){ Content =
|
||||||
new ObjectContent (typeof(string),
|
new ObjectContent (typeof(string),
|
||||||
ex.Message, new SimpleFormatter("text/text")) };
|
ex.Message, new SimpleFormatter("text/text")) };
|
||||||
@ -140,7 +141,7 @@ namespace Yavsc.ApiControllers
|
|||||||
tmpe.Session.Add ("estim", e);
|
tmpe.Session.Add ("estim", e);
|
||||||
|
|
||||||
Profile prpro = new Profile(ProfileBase.Create(e.Responsible));
|
Profile prpro = new Profile(ProfileBase.Create(e.Responsible));
|
||||||
if (!prpro.IsBankable)
|
if (!prpro.HasBankAccount)
|
||||||
throw new TemplateException ("NotBankable:"+e.Responsible);
|
throw new TemplateException ("NotBankable:"+e.Responsible);
|
||||||
|
|
||||||
Profile prcli = new Profile(ProfileBase.Create(e.Client));
|
Profile prcli = new Profile(ProfileBase.Create(e.Client));
|
||||||
|
@ -82,12 +82,11 @@ namespace Yavsc.Model.RolesAndMembers
|
|||||||
[Display(Name="Google_calendar",ResourceType=typeof(LocalizedText))]
|
[Display(Name="Google_calendar",ResourceType=typeof(LocalizedText))]
|
||||||
public string GoogleCalendar { get; set; }
|
public string GoogleCalendar { get; set; }
|
||||||
|
|
||||||
public bool IsBankable { get {
|
public bool HasBankAccount { get {
|
||||||
return IsBillable
|
return IsBillable
|
||||||
&& !string.IsNullOrWhiteSpace (BankCode)
|
&& !string.IsNullOrWhiteSpace (BankCode)
|
||||||
&& !string.IsNullOrWhiteSpace (BIC)
|
&& !string.IsNullOrWhiteSpace (BIC)
|
||||||
&& !string.IsNullOrWhiteSpace (IBAN)
|
&& !string.IsNullOrWhiteSpace (IBAN)
|
||||||
&& !string.IsNullOrWhiteSpace (BankCode)
|
|
||||||
&& !string.IsNullOrWhiteSpace (WicketCode)
|
&& !string.IsNullOrWhiteSpace (WicketCode)
|
||||||
&& !string.IsNullOrWhiteSpace (AccountNumber)
|
&& !string.IsNullOrWhiteSpace (AccountNumber)
|
||||||
&& BankedKey != 0; } }
|
&& BankedKey != 0; } }
|
||||||
|
Reference in New Issue
Block a user