0% found this document useful (0 votes)
65 views6 pages

Pseudo Code Made Tails

This document describes the code behind and member functions of a class named frmMADetails. It contains 12 methods that perform operations like loading data, saving MA details, changing order statuses, adding outlet peoples, assigning dates, and adding products. Each method calls business layer functions to execute stored procedures or SQL queries. Validations are performed and exceptions are handled. Global variables like datasets and datatables are used to share data between methods and the business layer.

Uploaded by

Amit Sinha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views6 pages

Pseudo Code Made Tails

This document describes the code behind and member functions of a class named frmMADetails. It contains 12 methods that perform operations like loading data, saving MA details, changing order statuses, adding outlet peoples, assigning dates, and adding products. Each method calls business layer functions to execute stored procedures or SQL queries. Validations are performed and exceptions are handled. Global variables like datasets and datatables are used to share data between methods and the business layer.

Uploaded by

Amit Sinha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

Screen Name : MA Details

Code Behind:
Global Variables:
clsOperation _objBAL = new clsOperation();
//Declaring and instantiation Business Layer
_int!eturn"alue as #nteger;
//$o %old content o& data &ro' BAL
_ds as Data(et;
//$o %old t%e returned )alue as indicator &ro' BAL
_dt as Data$able;
//$o %old t%e returned )alue as indicator &ro' BAL
Class Name : &r'MADetails
Member Variables:
Member Functions:
*age_Load
//Loads t%e re+uired data &or ,# and binds all drop down lists
btn(a)e_-lic.
//-alls t%e &unction to sa)e t%e MA Details
&n(a)eDetails
//-alls t%e BAL &unction and passes re+uired para'eters to sa)e t%e MA Details
btn"oid_-lic.
//-%anges t%e status to "oid &or particular MA Order
btnAppro)e_-lic.
//-%anges t%e status to Appro)e &or particular MA Order
btnAdd_-lic.
///ilters t%e selected outlet peoples and calls a &unction to generate 'ail
noti&ication
&nOutList
//Binds t%e list o& outlet people to listbo0
&nAssignDates
//Assigns all t%e dates &or MA Order (creen
&nAdd*roduct
//Add t%e products &or particular MAL 1o in t%e database
Method No. 1: *age_Load
Local Variables:
Input Parameters:
utput parameters:
Lo!ic:
1eed to c%ec. user id session e0ist or not and redirect to login page
1eed to c%ec. &or user pri)ileges &or t%is screen and redirect to login page i&
&ails
#nitiali2es t%e instance o& global datatable )ariable as &ollows3
_dt = new Data$able();
-alls t%e BAL &unction and passes $able 1a'e para'eter *rocedure 1a'e
and _dt to t%e &unction o& BAL
_obj-o''on&n40ecute(*(5spMADetails67 _dt);
$%is &unction will return a dataset w%ic% will be stored in )iewstate and used
to bind t%e data to t%e re+uired controls
1eed to c%ec. t%e MA (tatus #& it is 5Appro)ed6 t%en Appro)e button will not
be )isible

Validations:
"#ceptions:
1eed to %andle 1ull 40ception
1eed to %andle 8eneral 40ception
1eed to %andle ,ser 40ception
1eed to write t%e log by calling 4rror Log &unction o& BAL
Method No. $: btn(a)e_-lic.
Local Variables:
int#ndicator as #nteger
// $o .eep t%e indicator w%et%er t%e data is stored in database or not
Input Parameters:
utput parameters:
Lo!ic:
-alls t%e &n(a)eDetails &unction to sa)e t%e MA Details in database #t
returns an indicator integer #& t%e integer is 9 t%en t%e data is not inserted
ot%erwise t%e data is inserted in database
#& int#ndicator is greater t%an 9 t%en do t%e &ollowing3
(%ow t%e ot%er sections to t%e user by calling t%is
tblDetails"isible = true;
call t%e &nOutletList &unction to bind t%e outlet list in t%e listbo0

Validations:
"#ceptions:
1eed to %andle 1ull 40ception
1eed to %andle 8eneral 40ception
1eed to %andle ,ser 40ception
1eed to write t%e log by calling 4rror Log &unction o& BAL
Method No. %: &n(a)eDetails
Local Variables:
int#ndicator as #nteger
// $o .eep t%e indicator w%et%er t%e data is stored in database or not
-reates a object o& datatable as &ollows3
Data$able dt*ara's=new Data$able();
Input Parameters:
utput parameters:
Lo!ic:
1eed to add two colu'ns in t%is Data$able
*ara'eter1a'e
*ara'eter"alues
1eed to add all t%e para'eters na'e and )alues to t%is datatable
1eed to call t%e &unction o& BAL to e0ecute t%e (* w%ic% will ta.e *rocedure
na'e and t%e datatable as para'eters and it will return a dataset wic% will
contain t%e MAL nu'ber &or t%e MA Details
MAL 1u'ber will be s%own to t%e label And indicator will be returned as
integer
Validations:
1eed to c%ec. t%e supplier nu'ber is selected or not
1eed to c%ec. t%e (eason -ode is selected or not
1eed to c%ec. t%e -urrency is selected or not
-%ec. &or !e'ar.s lengt% is :99 c%aracters
"#ceptions:
1eed to %andle 1ull 40ception
1eed to %andle 8eneral 40ception
1eed to %andle ,ser 40ception
1eed to write t%e log by calling 4rror Log &unction o& BAL
Method No. &: btn"oid_-lic.
Local Variables:
int#ndicator as #nteger
// $o .eep t%e indicator w%et%er t%e data is stored in database or not
Input Parameters:
utput parameters:
Lo!ic:
*repares a string s+l +uery to update t%e status as )oid &or particular MAL
1u'ber
1eed to call t%e &unction o& BAL to e0ecute t%e string s+l +uery w%ic% returns
int as indicator #& t%e status will be updates a 'ail will be t%rown to t%e
outlet peoples and t%e user will be redirected to &r'MA(earc% page
Validations:
"#ceptions:
1eed to %andle 1ull 40ception
1eed to %andle 8eneral 40ception
1eed to %andle ,ser 40ception
1eed to write t%e log by calling 4rror Log &unction o& BAL
Method No. ': btnAppro)e_-lic.
Local Variables:
int#ndicator as #nteger
// $o .eep t%e indicator w%et%er t%e data is stored in database or not
Input Parameters:
utput parameters:
Lo!ic:
*repares a string s+l +uery to update t%e status as Appro)e &or particular
MAL 1u'ber
1eed to call t%e &unction o& BAL to e0ecute t%e string s+l +uery w%ic% returns
int as indicator #& t%e status will be updates a 'ail will be t%rown to t%e
outlet peoples and t%e user will be redirected to &r'MA(earc% page
Validations:
"#ceptions:
1eed to %andle 1ull 40ception
1eed to %andle 8eneral 40ception
1eed to %andle ,ser 40ception
1eed to write t%e log by calling 4rror Log &unction o& BAL
Method No. (: btnAdd_-lic.
Local Variables:
Input Parameters:
utput parameters:
Lo!ic:
1eed to call t%e &unction o& BAL to insert t%e selected outlet areas in t%e
database wit% t%e MAL 1u'ber
Binds t%e grid below to s%ow t%e added outlet areas &ro' database
Validations:
1eed to c%ec. t%e outlet area list selected or not
"#ceptions:
1eed to %andle 1ull 40ception
1eed to %andle 8eneral 40ception
1eed to %andle ,ser 40ception
1eed to write t%e log by calling 4rror Log &unction o& BAL
Method No. (: &nOutList
Local Variables:
Input Parameters:
utput parameters:
Lo!ic:
#nitiali2ing t%e global dataset )ariable as &ollows3
_ds = new Data(et();
/etc%ing t%e )alues &ro' )iewstate in data set as &ollows
_ds ="iew(tate;5Data6< as Data(et;
Binds t%e outlet list ListBo0 using t%is dataset
Validations:
"#ceptions:
1eed to %andle 1ull 40ception
1eed to %andle 8eneral 40ception
1eed to %andle ,ser 40ception
1eed to write t%e log by calling 4rror Log &unction o& BAL
Method No. ): &nAssignDates
Local Variables:
Input Parameters:
utput parameters:
Lo!ic:
Assigns t%e date to t%e date controls($e0tBo0es)
MA -reated Date s%ould be current date
(%ip'ent date s%ould be plus = days &ro' MA -reated date
Deli)ery date s%ould be plus = days days &ro' s%ip'ent date
40piry date s%ould be plus :> days &ro' Deli)ery Date
Validations:
"#ceptions:
Method No. (: &nAdd*roduct
Local Variables:
str-arton as string // $o collect carton no &ro' ,# 8rid
strArticle-ode as string // $o collect article code &ro' ,# 8rid
str-olor as string // $o collect color &ro' ,# 8rid
int,nit-ost as integer // $o collect cost o& product &ro' ,# 8rid
str!cp as string // $o collect !-* &ro' ,# 8rid
str,OM as string // $o collect ,OM &ro' ,# 8rid
int?ty as string // $o collect ?uantity o& *roduct &ro' ,# 8rid
intOrder?ty as string // $o collect ?uantity orderd &ro' ,# 8rid
int$otalA't as string // $o collect $otal A'ount o& *roduct &ro' ,#
8rid
Input Parameters:
utput parameters:
Lo!ic:
#nitiali2ing t%e global dataset and datatable )ariable as &ollows3
_ds = new Data(et();
_dt = new Data(et();
/inds t%e &ooter control o& grid g)Add*roduct and stores it in t%e local
)ariables
-alles t%e BAL &unction and passes t%e para'eters to insert t%e data w%ic%
returns dataset wit% t%e new data as &ollows
ds=obj-o''on40ecute(*(5sp#nsert*roduct67 _dt);
Binds t%e g)Add*roduct wit% t%e new data ,ser can add 'ultiple product
wit% t%e speci&ied cartons
Validations:
"#ceptions:
1eed to %andle 1ull 40ception
1eed to %andle 8eneral 40ception
1eed to %andle ,ser 40ception
1eed to write t%e log by calling 4rror Log &unction o& BAL

You might also like