Monday, November 14, 2011
Axapta disable specify column in Grid
if(Table.TableField== Enum::Value)
{
DataSource.object(fieldNum(Table,TableField1)).AllowEdit(true);
DataSource.object(fieldNum(Table,TableField2)).AllowEdit(true);
}
else
{
DataSource.object(fieldNum(Table, TableField1)).AllowEdit(false);
DataSource.object(fieldNum(Table,TableField2)).AllowEdit(false);
}
Example :-
For above grid, I would like to allow user edit the open season date and close season date when the season status is New, hence the code will as below :-
if(AvZoneMasterSeason.AvSeasonStatus == AvSeasonStatus::New)
{
AvZoneMasterSeason_ds.object(fieldNum(AvZoneMasterSeason,AvSeasonStartDate)).AllowEdit(true);
AvZoneMasterSeason_ds.object(fieldNum(AvZoneMasterSeason,AvSeasonCloseDate)).AllowEdit(true); }
else
{ AvZoneMasterSeason_ds.object(fieldNum(AvZoneMasterSeason,AvSeasonStartDate)).AllowEdit(false);
AvZoneMasterSeason_ds.object(fieldNum(AvZoneMasterSeason, AvSeasonCloseDate)).AllowEdit(false);
}
Axapta basic calling method knowledge
Sunday, October 16, 2011
Axapta, create an EDT for allow particular data display in drop down list
but we only wish to select a particular group of data (example Zone) to display in drop down list in form.
Hence we create an EDT to help us for the filtering job.
Steps
1. Create a EDT, and set a normal relationship for it
2. Set the relationship as below :-
Wednesday, October 12, 2011
Axapta Display method for select row in Grid
since I need the exactly related record, not the currently select grid record. therefore I need to set parameter on the Display method to allow the system know which row of record I refer.
Step by Step
1. Create a Display method on the child table which will display records in detail grid :-
2. Write the code below to the method:-
3. Create a new Control to the detail grid.
4. Right click the Control and select properties. Set AllowEdit = No, DataSource = Child Table (which contain the display method) and DataMethod = Display Method that created just now
5. Done. =)
Tuesday, October 11, 2011
AX Form containing 2 Grids with related data
When the user select Warehouse in header grid, the detail grid will refresh and get all data based on the selection.
Steps
1. Add the relationship on the child table which will appear in detail grid :-
2. Create a Form and add the parent table and child table as Data Source :-
3. Right click child table and select properties, then insert the CounterField as the field to link with parent table and insert parent table at JoinSource.
4. Drag and Drop the parent table's fields from DataSource to Header Grid and child table's fields to Detail Grid
5. Remember set the DataSource of the Header Grid to Parent table and Detail Grid's DataSource to Child table
6. Compile the Form then you will get the expected result as shown.
Monday, August 8, 2011
Utilitarianism
Utilitarianism is an ethical creaturistic theory holding that the right course of action is the one that maximizes the overall "good" consequences of the action.It is thus a form of consequentialism, meaning that the moral worth of an action is determined by its resulting outcome. The most influential contributors to this theory are considered to be Jeremy Bentham and John Stuart Mill.
Utilitarianism was described by Bentham as "the greatest happiness or greatest felicity principle".
Utilitarianism can be characterised as a quantitative and reductionist approach to ethics. It is a type of naturalism.It can be contrasted with deontological ethics (which do not regard the consequences of an act as a determinant of its moral worth), pragmatic ethics, and virtue ethics (which focuses on character), as well as with other varieties of consequentialism.
Tuesday, July 12, 2011
Do Not JOIN Sunway International Vacation Club
Monday, July 4, 2011
Tips for removing Scars
- Apply lemon juice on the scarred area twice a day, by means of a cotton pad. Alternatively, you can cut a fresh lemon and rub this on your skin, twice a day.
- Cocoa butter is a natural skin healer. Apply the butter on your scars twice a day and massage it into the skin, until the skin completely absorbs it.
- Honey is one of the oldest remedies to heal wounds and burns, due to its healing properties. Since it has anti-bacterial properties, it can also help you remove stubborn scars in a few months, if applied twice daily.
- Mix sandalwood and powdered black gram with rose water and make a smooth paste of it. Apply the paste on the scarred skin and leave it on overnight. Wash off the next morning with cool water. This helps in improving skin tone and reducing scars.
- Application of cucumber juice on scars will tighten pores, thereby improving skin tone and reducing the marks.
- Aloe Vera is one of the best remedies to get rid of scars naturally. Application of this, twice a day, will give you noticeable results within a few days.
- Make a paste of raw garlic and rub this into your skin. It is a healer and also a skin toner.
- Massaging vitamin E oil onto the scars will help them vanish within a few weeks. In the absence of vitamin E oils, capsules can also be used. The oil in them can be squeezed out and applied on the scars.
- Crushed mint leaves can be applied to scars, to help the skin heal faster.
- Fresh tomato juice is an excellent skin rejuvenating agent and can help the skin heal faster.
- Mix a little baking soda with water and massage the scarred skin with this, for at least a minute. Rinse the skin with lukewarm water and apply a very light coat of olive oil. Wash off with warm water after five minutes. Doing this once daily will help remove scars sooner than you can imagine.
- Make a paste of fenugreek seeds and rose water and apply this as a face pack. Wash off after fifteen minutes, for great results.
- Mash a ripe banana thoroughly and apply on your skin for ten minutes. Wash off with cold water, for getting well-toned skin.
- Grate a potato and wrap it in soft, thin linen. Wait for the juice of the grated potato to start coming through the linen. Rub this over the scarred skin, leave for ten minutes and then wash it off with warm water.
Monday, June 27, 2011
The difference in TRUNCATE and DELETE
at website http://codebetter.com/raymondlewallen/2005/05/09/the-difference-in-truncate-and-delete-in-sql-server/
A common misconception is that they do the same thing. Not
so. In fact, there are many differences between the two.
DELETE is a logged operation on a per row basis. This means
that the deletion of each row gets logged and physically deleted.
You can DELETE any row that will not violate a constraint, while leaving the foreign key or any other contraint in place.
TRUNCATE is also a logged operation, but in a different way.
TRUNCATE logs the deallocation of the data pages in which the data
exists. The deallocation of data pages means that your data
rows still actually exist in the data pages, but the
extents have been marked as empty for reuse. This is what
makes TRUNCATE a faster operation to perform over DELETE.
You cannot TRUNCATE a table that has any foreign key
constraints. You will have to remove the contraints, TRUNCATE the
table, and reapply the contraints.
TRUNCATE will reset any identity columns to the default seed
value. This means if you have a table with an identity column and
you have 264 rows with a seed value of 1, your last record will have
the value 264 (assuming you started with value 1) in its identity
columns. After TRUNCATEing your table, when you insert a new
record into the empty table, the identity column will have a value of
1. DELETE will not do this. In the same scenario, if you
DELETEd your rows, when inserting a new row into the empty table, the
identity column will have a value of 265.
Tuesday, May 10, 2011
Malaysia House Loan payment/ bank disbursement progress
THIRD SCHEDULE(SCHEDULE G)
(Clause 4(1))
SCHEDULE OF PAYMENT OF PURCHASE PRICE
(for land and building)
Installment Payable
1. Immediately upon the signing of this Agreement(S & P)------ 10%
2. Within 21 working days after receipt by the Purchaser of the Vendor's written
notice of the completion of :
(a) the foundation and footing works of the said Building--------- 10%
(b) the reinforced concrete framework of the said Building-------- 15%
(c) the walls of the said Building with door and window frams
placed in position---------------------------------------------10%
(d) the roofing,electrical wiring, plumbing(without fittings),
gas piping and internal telephone trunking and cabling to
the said Building--------------------------------------------- 10%
(e) the internal and external plastering of the said Building ---- 10%
(f) the sewerage works serving the said Building ----------------- 5%
(g) the drains serving the said Building ------------------------- 5%
(h) the roads serving the said Building -------------------------- 5%
3. On the date the Purchase takes vacant possession of
the said Building with water and electricity supply ready
for connection -------------------------------------------------12.5%
4. Within 21 working days after receipt by the Purchase or
the Purchasers solicitors of the separate document of title to
the said Lot together with a valid and registrable Memorandun
of Transfer to the Purchase duly executed by the Vendor or
on the date Purchase takes vacant possession of the said
Building, whichever is later -----------------------------------2.5%
5. On the date Purchaser takes vacant possession of the said Building as
in item 3 and to be held by the Vendor's solicitor as stakeholder for
payment to the Vendor as follows: ------------------------------ 5%
(a) 2.5 % at the expiry of 6 months after the date the Purchaser takes vacant
of the said Building.
(b) 2.5% at the expiry of 18 months after the date the Purchaser takes vacant
possesion of the said Building
Total-------------------------------------------------------------100%
THIRD SCHEDULE (SCHEDULE H)
(Clause 4(1))
SCHEDULE OF PAYMENT OF PURCHASE PRICE
(for building intended for subdivision)
Instalment Payable
1. Immediately upon the signing of this Agreement ------------------ 10%
2. Within 21 working days after receipt by the Purchaser of the Vendor's written
notice of the completion of :
(a) the work below ground level including piling and foundation of
the said Building comprising the said Parcel --------------------10%
(b) the reinforced concrete framework of the said Parcel ----------- 15%
(c) the walls of the said Parcel with door and window frames
placed in position ----------------------------------------------10%
(d) the roofing/ceiling, electrical wiring, plumbing (without fittings),
gas piping (if any) and internal telephone trunking and cabling
to the said Parcel --------------------------------------------- 10%
(e) the internal and external plastering of the said Parcel -------- 10%
(f) the sewerage works serving the said Building ---------------------5%
(g) the drains serving the said Building -----------------------------5%
(h) the roads serving the said Building ------------------------------5%
3. On the date the Purchaser takes possession if the said Parcel
with water and electricity supply ready for connection to
the said Parcel ------------------------------------------------12.5%
4. Within 21 working days after receipt by the Purchaser of the
written confirmation of the vendor's submission to and
acceptance by the Appropriate Authority of the application
for subdivision of the said Building---------------------------- 2.5%
5. On the date Purchaser takes vacant possession of the said Parcel as
in item 3 and to be held by the Vendor's solicitor as stakeholder for
payment to the Vendor as follows: -------------------------------5%
(a) 2.5 % at the expiry of 6 months after handing over of vacant possession.
(b) 2.5% at the expiry of 18 months after the date the Purchaser takes vacant
possesion of the said Building
Total ......................................................100%
Sunday, January 30, 2011
怀孕期不能犯的错误(二)
文:陈品廷医师
{12}懒散
有些孕妇片面理解孕期休息越长越好,很少活动,生活散漫而规律,这不仅对胎儿发育不利,还给正常分娩带来麻烦,使产程延长,滞气增多。
{13}不当的节食
有些孕妇担心自己分娩后变胖,失去“体型美”,孕期不敢多吃或不吃肉、蛋等营养品,有的甚至比平时吃得还少。这就不能满足胎儿迅速生长发育的需要,对胎儿后天也会造成难以弥补的损害。
{14}营养“过度”
也有一些孕妇片面地认为吃得越好,营养越丰富,对胎儿越有利。所以孕期对饮食采取“多多益善”和“见好就吃”的态度,结果造成体重增加过快,容易引起“巨大胎儿”,不仅给分娩造成困难,也是产后发胖的原因之一。
{15}参加剧烈运动或干重活儿
少数孕妇在孕期仍参加剧烈的体育竞赛活动,或做挑、抬、提、扛等重活儿,这是很危险的,容易引起流产或早产。
{16}妊娠晚期远行
个别孕妇接近预产期,仍去外地旅行,这是相当危险的。在这种毫无准备下分娩,极易发生危险,一定要避免。
{17}不讲究精神卫生
不少孕妇不注意孕期精神保健,好发脾气,生闲气,或精神苦闷、焦虑、忧愁。殊不知恶劣的情绪不仅直接影响孕妇的饮食和睡眠,有碍健康,还会对胎儿造成有害的影响,不利于优生。
{18}忘记或记错了预产期
有些孕妇不注意记预产期,以为是小事,而小事却常引来大麻烦。由于预产期不清,使产前准备工作受到影响,成为到外地或在旅途中意外分娩的主要原因。对母子健康十分不利。
{19}自己做主, 要求做剖宫产
当前,许多孕妇害怕分娩时“遭罪”,或误信剖宫产的孩子聪明,本可以正常分娩的,却迫切要求做剖宫产。这种做法弊多利少。因为与正常的自然分娩相比,剖宫产不仅孕妇要承担更大、更多的风险,而且对新生儿也不利,出生后的患病率增高。因此,孕妇不要自己要求做剖宫产,对于那些不能自然分娩的孕妇,医生会选择剖宫产的。
怀孕期不能犯的错误(一)
文:陈品廷医师
大量产科统计、调查资料表明,孕期及分娩时发生的种种异常(流产、早产、难产等),很大一部分是孕妇自己忽视自我保健造成的。从某种意义上说,是她们自己犯的“错误”。归纳一下常见的有以下几种:
{1}可疑妊娠不及时去检查
不少孕妇在开始出现某些早孕反应时不以为然,既不及时告诉家里亲人,更不主动去医院检查,一拖就是一、两个月。
这样,确定妊娠时,大多已是妊娠三个多月了,这样一来引起畸胎和容易造成流产的危险时期,忽视了早孕保健,对母子健康极为不利,甚至可导致严重后果。
{2}确定妊娠后,不按期进行产前检查
目前,尚有相当一部分孕妇出于羞怯或嫌麻烦等原因,不进行或不按期进行产前检查,这就不能及时发现妊娠并发症及胎位、胎儿异常,是造成难产的重要原因之一。
{3}孕期滥用药物
孕期,尤其是早孕阶段,不经医嘱而自己滥用药,特别是某些抗生素、激素、止痛药和镇静安眠药等,这是引起畸胎的重要因素。
{4}有病不用药,怕影响胎儿
孕期不可滥用药,但并非是不用药,大多数药对胎儿还是安全的,所以孕期患病还是要在医生指导下正确用药,切不可“忌药讳医”。
{5}不注意防治风疹等病毒感染
风疹、肝炎、巨细胞病毒可严重损害胚胎组织、引起畸胎、流产。因此,孕妇不可忽视上述病毒感染,应积极预防,一经发现患风疹、病毒性肝炎等,应立即就医,认真治疗,不可大意。风疹病毒是导致畸胎的头号杀手。
{6}接触有害物质,多次做B超
孕期尤其是早孕阶段,是胎儿重要器官分化和形成的关键时期,应该注意避免和防止有毒有害物质接触,如化学农药、重金属铅、镉和甲基汞等,以及放射性物质。因此,孕妇应对上述物质加强防范。而且不要多次进行B超或X线检查,以免伤害胎儿。
{7}嗜烟、酒
孕妇大量吸烟或酗酒,可致畸胎。因此,孕期应戒烟酒。
{8}对丈夫过度依赖或苛求丈夫
少数孕妇对妊娠认识不清,怕字当头,什么也不做,家务完全让丈夫做,并苛求丈夫对自己千依百顺。这种过度依赖使孕妇活动量大减,心理上也处于消极、被动状态,对健康有害无益,容易导致身心脆弱、甚至成为难产的重要因素。
{9}完全禁欲,冷落丈夫
{10}不节制性生活
妊娠早期及晚期不节制性生活,常是引起流产、早产、宫内感染的诱因
{11}自我封闭,不出家门
有些孕妇自认为怀孕后出现蝴蝶斑或大腹便便,变丑、变笨了,不愿意让别人看见自己这个形象;还有一些孕妇误解为到外面活动多了会影响体内胎儿,因此,闭门不出,进行自我封闭。这种做法不仅有害孕妇本人的身心健康,也会妨害胎儿,不利于优生。
孕期性生活疑问解答
文:陈品廷医师
行医期间曾经遇到有些夫妇会向我询问有关怀孕时期的夫妻生活。幸好在北京实习那段日子,由于跟妇科老师相当要好,奶奶级老师竟然担心我将来回马在妇科上会碰到窘境,就把她多年的小秘密传给我。以下就和大家分享有关部门常识。
Q:我俩的性生活一直很甜蜜、很和谐。怀孕了,我们还能继续保持性生活吗?
A:对于绝大多数夫妇来说,孕期继续甜蜜生活是安全的。尽管高潮时的兴奋和乳头刺激都会带来一定程度的宫缩,但这种宫缩对于健康的准妈妈来说是不会引起流产的。同时这种性高潮对于准妈妈来说也是一种释放。亲热后会有一点点的痉挛也是正常的。但是,如果痉挛或宫缩一直持续,或者出血了,就必须去医院了。需要特别注意的就是双方私处的卫生,避免不必要的细菌感染。
Q:怀孕后我好像比以前更渴望和老公亲热了,可又感到非常难为情,我觉得自己的性欲强烈了许多。这是不是不正常?
A:准妈妈们绝对不必为此感到羞耻。在度过了孕期最初不太舒服的三个月,并且怎么呆着都不是很舒服的最后三个月也还没有来到之前,准妈妈通常都会对性生活更加享受和感到渴望,也更容易达到高潮。从生理学来讲,亲热的兴奋会增强血液流动,使骨盆、子宫、阴道和阴蒂等部位的血流量增加,这种骨盆的充血就会增加女性的快感,进入高潮的兴奋。而这一系列又会导致更加强烈的性欲。加之孕期女性体内的雌性激素水平的提高,和对于孕育爱情结晶的幸福感,也都是女性性欲增长可能的原因。
Q:我现在怀孕24周,宝宝每天在肚子都很活跃。在一次亲热的兴奋之后,我发现宝宝有一个半小时都没有动静。是不是我的兴奋伤到了他?
A:对于大多数健康的准妈妈来说,性高潮时子宫有规律地收缩,这种收缩并不足以扰乱脐带血的流动或导致早产。但对于高危的准妈妈来说就不一定了。不过说到胎动,对于24周的胎儿来说,宝宝的神经系统尚未发育完全。尚未有研究证明这个时期的胎动与胎儿健康与否有什么绝对的关联。
Q:很多朋友都告诉我,她们在怀孕的时候性欲会很旺盛。可我现在怀孕5个月,感觉自己一点也没有这方面的兴趣,觉得老公也不开心。是不是我有什么问题?
A:没有。每个女人都不同,有人会在整个孕期性欲很强,有人则一直都提不起性趣;也有的人这个月很想要可下个月就不想了。而孕期变化也是不同的,你现在的感受并不意味着你整个孕期都将是这样。怀孕期间,很多东西会影响准妈妈的性趣:孕早期的疲劳、恶心、呕吐,日渐增长的大肚子,亲热时找不到一个舒服的姿势,甚至因为自己身型的变化而信心减弱等等。重要的是,和丈夫解释清楚你的现状与感受,从而不至于让他感到沮丧或者以为是他自己做了什么而让你不高兴。彼此的理解和沟通是十分重要的。
Q:怀孕后,每次亲热时老公总是因为担心进入会伤到肚子里的宝宝,而不能尽兴。到底会不会伤害到宝宝呢?
A:不会的。事实上,准爸爸的进入部分根本不可能碰破羊水,也更不可能伤及胎儿。只是由于准妈妈阴道血流量的增加以及阴道的肿胀,剧烈的摩擦比较容易出现出血的现象。所以,准爸爸要是能更温柔一些就可以了。
怀孕期间的8大危险现象(上)
文:陈品廷医师
准妈妈最关心的是如何平安度过孕期,直到分娩出正常的婴儿。所以妊娠期间,一些准妈妈整日提心吊胆,只要出现一些症状就要到医院查个究竟。也难怪,毕竟腹中还有个宝宝呢!
但这样的心情注定了这个孕期不安稳。科学证明,孕妇的情绪对胎儿有影响。因此,认识孕期的一些正常现象和一些可能发生的异常妊娠现象,是每位准妈妈必须学习的课题,这样既能减少准妈妈一些不必要的担心,又能对一些不利情况做到早发现、早治疗。
1. 早期怀孕出血与胚胎萎缩
怀孕初期,常会有血样状的阴道分泌物,或阴道出血,有的还伴有轻微下腹疼痛,这样的情况称之为“先兆性流产 ”。临床上,早期怀孕约有1/4的可能会出现出血,其原因可能是生理性的着床出血或病理性的子宫颈病灶。特别是性行为后出血,更应确诊是否有子宫颈息肉或子宫颈出血。大部分的出血会维持数天甚至数星期,医师会嘱咐病人多卧床休息并停止性生活,必要时给予黄体酮或针对子宫颈病灶做处理。
若是在怀孕6-7周时超声检查仍不见胎心出现,就要怀疑是否是“萎缩性胚囊”。胚胎萎缩有60%左右是因为受精卵染色体异常,或受精卵本身有问题所致。因此,这并不是由准爸爸准妈妈的粗心大意造成,而是自然淘汰的结果。遇到此类情况,父母双方首先应做坦然接受,并配合医生做适当处理,才是应该有的正确态度。因为,自然因素而导致流产 的机率高达15%-20%。
2. 子宫颈闭锁不全
这情况多发生在妊娠中期,原因主要是先天性子宫颈发育异常和后天子宫颈伤害。先天性约占30%-50%,其中包括母亲在怀孕期间服用DES这类药物。后天性原因大部分与人工流产手术或经历过子宫颈癌初期的子宫颈锥状切除有关。子宫颈闭锁不全的主要治疗方法是妊娠14~16周时施行子宫颈缝合术,手术可能的副作用是破水、出血或感染。
3. 产前出血
是指怀孕28周后的阴道出血。主要原因有4点:
1)胎盘异常:前置胎盘、胎盘早期剥离最为常见。
2)子宫颈与阴道疾病:如子宫颈糜烂 、子宫息肉或子宫颈癌 。另外,阴道外伤或异物置入等,也会造成出血。
3)泌尿道感染造成的血尿。
4)血液科疾病,如:凝血功能异常。
发生产前出血时,应尽快就医并找出出血原因。超声波可得知有无前置胎盘,如确定无前置胎盘,则应进一步确诊是否有子宫颈或阴道疾病。另外,尿液检查及凝血功能测试也可提供进一步资讯。某些特殊情况,比如胎盘早期剥离,如果具备剖宫产的条件,以尽快生产为宜。