132 DAFTAR PUSTAKA • Alan Beaulieu, Sanjaya Mishra, Mastering

advertisement
DAFTAR PUSTAKA

Alan Beaulieu, Sanjaya Mishra, Mastering Oracle SQL, O’Reilly, 2002

Fathansyah, Basis Data, Informatika, Bandung, 1999.

Hasni I, Pohan, SQL + Tutorial, Informatika, Bandung, 2002.

Erick Kurniawan, Cepat Mahir ASP.NET 3.5 Untuk Aplikasi WEB
Interaktif, Andi, Jakarta, 2010.

Mengenal Customer Relationship Management. http://www.vinnocrm.com/pertanyaan-seputar-crm.html. Diakses pada tanggal 22 Desember
2010.

Apa itu CRM ?. http://cahyo-adi.blogspot.com/2008/06/apa-itu-crm.html .
Diakses pada tanggal 22 Desember 2010.
132
133
Default.aspx
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div style="left: 10px; clip: rect(10px 10px 10px 10px); top:
10px; text-align: center">
<br />
<strong><em><span style="font-size: 14pt; color: #3366ff;
font-family: Arial Baltic">
Sales Management System<br />
</span></em></strong>
<br />
<asp:Image ID="Image1" runat="server"
ImageUrl="~/images/mainpic.jpg" /><br />
<br />
<br />
<br />
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/images/indonesia.jpg"
OnClick="ImageButton1_Click" />
Indonesia 
<asp:ImageButton ID="ImageButton2" runat="server"
ImageUrl="~/images/inggris.jpg"
OnClick="ImageButton2_Click" />
English</div>
</form>
</body>
</html>
Defaul.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
CJM.Database.Oracle;
System.Data.OracleClient;
CJM.Reference;
CJM.Project.LGE;
System.Drawing;
public partial class Default2 : System.Web.UI.Page
134
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void ImageButton1_Click(object sender,
ImageClickEventArgs e)
{
string bahasa = "indonesia";
Session["SESS_LANG"] = bahasa.ToString();
//string cek = Session["SESS_LANG"].ToString();
Response.Redirect("~/login.aspx");
}
protected void ImageButton2_Click(object sender,
ImageClickEventArgs e)
{
string bahasa = "english";
Session["SESS_LANG"] = bahasa.ToString();
Response.Redirect("~/login.aspx");
}
}
Login.aspx
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="login.aspx.cs" Inherits="Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
/>
<title>Employee Management System</title>
<link href="include/css/style_main.css" rel="stylesheet"
type="text/css" />
</head>
<body>
<form id="frmMain" runat="server">
s<br />
<br />
<br />
<br />
<br />
<br />
<table align="center" width="600">
<tr>
<td style="width: 260px; text-align: center; height:
1px;" valign="top">
<span style="font-size: 14pt; color: #3366ff;
font-family: Arial Baltic"><em><strong>
Sales Management System<br />
</strong></em></span>
<br />
135
<img src="images/mainpic.jpg" style="height:
260px" /><br />
<br />
</td>
<td valign="top" style="width: 536px; height: 1px;
text-align: center;">
<div class="section_box" align="justify">
<div class="subtitle" align="justify">
<asp:Label ID="Label3" runat="server"
Width="144px"></asp:Label><asp:ScriptManager ID="ScriptManager1"
runat="server">
</asp:ScriptManager>
</div>
<table cellpadding="3" cellspacing="3" border="0">
<tr>
<td style="width: 181px" align="left"
valign="top">Username</td>
<td align="left" valign="top">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="txtUsername" runat="server"
CssClass="input100" Width="160px" TabIndex="1"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td style="width: 181px;" align="left"
valign="top">Password</td>
<td align="left" valign="top">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:TextBox ID="txtPassword" runat="server"
CssClass="input100" TextMode="Password" Width="160px"
TabIndex="2"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td align="left" style="width: 181px" valign="top">
</td>
<td align="left" valign="top">
</td>
</tr>
<tr>
<td align="left" style="width: 181px" valign="top">
<asp:UpdatePanel ID="UpdatePanel6" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server"
ForeColor="Black" Visible="False" Width="180px"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td align="left" valign="top">
<asp:UpdatePanel ID="UpdatePanel3" runat="server">
<ContentTemplate>
136
<asp:TextBox ID="TextBox1" runat="server"
BackColor="LightBlue" TabIndex="3" Visible="False"
Width="160px"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td align="left" style="width: 181px" valign="top">
<asp:UpdatePanel ID="UpdatePanel7" runat="server">
<ContentTemplate>
<asp:Label ID="Label2" runat="server"
ForeColor="Black" Visible="False" Width="180px"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td align="left" valign="top">
<asp:UpdatePanel ID="UpdatePanel4" runat="server">
<ContentTemplate>
<asp:TextBox ID="TextBox2" runat="server"
BackColor="LightBlue" TabIndex="4" Visible="False"
Width="160px"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td colspan="2" align="center" valign="top">
<asp:UpdatePanel ID="UpdatePanel5" runat="server">
<ContentTemplate>
<asp:Button ID="btnLogin" runat="server"
CssClass="buttonBlue" Text="Login" OnClick="btnLogin_Click"
TabIndex="5" />
</ContentTemplate>
</asp:UpdatePanel>
 
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center"
valign="middle">
Copy Right @ CRM</td>
</tr>
</table>
</form>
</body>
</html>
Login.aspx.cs
137
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
CJM.Database.Oracle;
System.Data.OracleClient;
CJM.Reference;
CJM.Project.LGE;
System.Drawing;
public partial class Default : System.Web.UI.Page
{
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = buzdomain.com)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =blitz.buzdomain.com))); User
Id=buzapps; password=qwerty007;";
string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =xronosit))); User
Id=buzapps; password=qwerty007;";
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = blitz.co.id)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =buzdev))); User Id=buzapps;
password=qwerty007;";
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_LANG"].ToString() == "indonesia")
{
Label3.Text = "Wilayah Anggota";
}
if (Session["SESS_LANG"].ToString() == "english")
{
Label3.Text = "Members Area";
}
}
protected void btnLogin_Click(object sender, EventArgs e)
{
string inUsername = txtUsername.Text.Trim();
string inPassword = txtPassword.Text.Trim();
string newPass
= TextBox1.Text.Trim();
string ConNewPass = TextBox2.Text.Trim();
if (inPassword == "123456" && newPass == "" &&
ConNewPass == "" )
{
TextBox1.Visible = true;
TextBox2.Visible = true;
138
Label1.Visible = true;
Label2.Visible = true;
btnLogin.Enabled = true;
Label1.Text = "New Password";
Label2.Text = "Confirm New Password";
txtPassword.Focus();
txtPassword.Text = inPassword;
}
if (inPassword == "123456" && newPass != "" && ConNewPass
!= "")
{
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
OracleCommand cmd = new OracleCommand(" SELECT ID,
COMP_ID, FULL_NAME FROM UTL_REF_USER WHERE USER_NAME = '" +
inUsername + "' AND USER_PASSW='" + inPassword + "'", conn);
OracleDataReader dr = cmd.ExecuteReader();
if (dr.HasRows == false)
{
throw new Exception();
}
if (dr.Read())
{
if (dr["ID"].ToString() != "")
{
Session["SESS_USER_ID"] =
dr["ID"].ToString();
Session["SESS_COMP_ID"] =
dr["COMP_ID"].ToString();
Session["SESS_USER_NAME"] =
dr["FULL_NAME"].ToString();
Session["SESS_USER_DATE"] =
DateTime.Now.ToString("dd/MM/yyyy");
Session.Timeout = 3600;
string myQueryUSer = "UPDATE UTL_REF_USER
SET " +
"USER_PASSW
+ newPass + "'" +
" WHERE ID
='" + Session["SESS_USER_ID"] + "'";
bool suksesUpdatetUser =
ConnOracle.ExecNonQueryConnOra(myQueryUSer);
if (suksesUpdatetUser)
{
='"
139
Alert.Show("Welcom to Sales
Manajgement System");
//ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Delete Owner Failed'); window.location.href =
'RegistrasiOwner.aspx';", true);
Response.Redirect("~/AppModules/Default.aspx");
}
else
{
Alert.Show("New Password Wrong.");
}
}
else
{
Alert.Show("Username and Password
Wrong.");
txtUsername.Text = "";
txtPassword.Text = "";
}
}
}
catch (Exception)
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "MessagePopUp", "alert('Username or Password
Wrong'); window.location.href = 'LogOut.aspx';", true);
}
finally
{
conn.Dispose();
}
}
if (inPassword != "123456")
{
OracleConnection conn = new
OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
OracleCommand cmd = new
OracleCommand(" SELECT ID, COMP_ID, FULL_NAME FROM UTL_REF_USER
WHERE USER_NAME = '" + inUsername + "' AND USER_PASSW='" +
inPassword + "'", conn);
OracleDataReader dr =
cmd.ExecuteReader();
if (dr.HasRows == false)
140
{
throw new Exception();
}
if (dr.Read())
{
if (dr["ID"].ToString() !=
null)
{
Session["SESS_USER_ID"] =
dr["ID"].ToString();
Session["SESS_COMP_ID"] =
dr["COMP_ID"].ToString();
Session["SESS_USER_NAME"]
= dr["FULL_NAME"].ToString();
Session["SESS_USER_DATE"]
= DateTime.Now.ToString("dd/MM/yyyy");
Session.Timeout = 3600;
//Alert.Show("Welcom
to Sales Manajgement System");
Response.Redirect("~/AppModules/Default.aspx");
//ScriptManager.RegisterClientScriptBlock(this, typeof(Page),
"validationAlert", "window.setTimeout(\"alert('Insert
Success.')\", 0);", true);
//ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Welcom to Sales Manajgement System'); window.location.href
= 'AppModules/Default.aspx';", true);
}
else
{
//Alert.Show("Username and
Password Wrong.");
//ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Username or Password Wrong'); window.location.href =
'Default.aspx';", true);
ScriptManager.RegisterClientScriptBlock(this, typeof(Page),
"MessagePopUp", "alert('Username or Password Wrong');
window.location.href = 'LogOut.aspx';", true);
//txtUsername.Text = "";
//txtPassword.Text = "";
}
}
}
catch (Exception)
141
{
ScriptManager.RegisterClientScriptBlock(this, typeof(Page),
"MessagePopUp", "alert('Username or Password Wrong');
window.location.href = 'LogOut.aspx';", true);
}
finally
{
conn.Dispose();
}
}
}
}
Logout.aspx
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="LogOut.aspx.cs" Inherits="LogOut" %>
Logout.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml;
System.Text;
public partial class LogOut : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// bersihkan sampah/session sebelum logout
Session["SESS_USER_ID"] = null;
Session["SESS_COMP_ID"] = null;
Session["SESS_USER_NAME"] = null;
Session["SESS_LANG"] = null;
Session.RemoveAll();
Session.Clear();
Response.Write("<script>window.top.location.replace('Default.aspx'
);</script>");
Response.End();
}
}
DailySaleOut.aspx
142
<%--<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="RegistrasiOwner.aspx.cs" Inherits="AppModules_Default2"
%>
--%>
<%@ Page Language="C#" MasterPageFile="MasterPage.master"
AutoEventWireup="true" CodeFile="DailySaleOut.aspx.cs"
Inherits="AppModules_Default2" Title="Sales Management System"
EnableEventValidation ="false" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxUploadControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
<div style="text-align: left">
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Label ID="CaptionUtama" runat="server"
Width="450px" BackColor="White" Font-Size="Large"
ForeColor="SteelBlue" Visible="False"></asp:Label>
<dx:ASPxRoundPanel ID="ASPxRoundPanel3" runat="server"
BackColor="#EBF2F4"
CssFilePath="~/App_Themes/Glass/{0}/styles.css"
CssPostfix="Glass" HeaderText="Daily Sell Out"
SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css"
Width="200px">
<LeftEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</LeftEdge>
<HeaderContent>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</HeaderContent>
<ContentPaddings PaddingBottom="10px"
PaddingLeft="4px" PaddingTop="10px" />
143
<RightEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</RightEdge>
<HeaderRightEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderRightEdge.gif"
VerticalPosition="bottom" />
</HeaderRightEdge>
<Border BorderColor="#7EACB1" BorderStyle="Solid"
BorderWidth="1px" />
<HeaderStyle BackColor="White" Height="23px">
<BorderBottom BorderStyle="None" />
<Paddings PaddingBottom="0px" PaddingLeft="2px"
PaddingTop="0px" />
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderLeftEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</HeaderLeftEdge>
<BottomEdge BackColor="#D7E9F1">
</BottomEdge>
<PanelCollection>
<dx:PanelContent runat="server">
<table width="900">
<tr>
<td colspan="3" valign="top"
style="width: 864px; height: 282px;">
<asp:UpdatePanel id="UpdatePanel1"
runat="server">
<contenttemplate>
<dx:ASPxRoundPanel id="ASPxRoundPanel2" runat="server"
Width="272px" HeaderText="Input Type" CssPostfix="Office2003Olive"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
BackColor="#E2E8C9" __designer:wfdid="w2"
EnableDefaultAppearance="False">
<TopEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Olive/Web/rpTopEdge.png"></Backgr
oundImage>
</TopEdge>
<HeaderContent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Olive/Web/rpHeader.png"></Backgro
undImage>
</HeaderContent>
<ContentPaddings PaddingTop="10px" Padding="2px"
PaddingBottom="10px"></ContentPaddings>
<HeaderRightEdge>
144
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Olive/Web/rpHeader.png"></Backgro
undImage>
</HeaderRightEdge>
<Border BorderWidth="1px" BorderStyle="Solid"
BorderColor="#758D5E"></Border>
<HeaderStyle BackColor="#B5C48F">
<Paddings Padding="0px" PaddingRight="2px" PaddingBottom="7px"
PaddingLeft="2px"></Paddings>
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#758D5E"></BorderBottom>
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Olive/Web/rpHeader.png"></Backgro
undImage>
</HeaderLeftEdge>
<DisabledStyle ForeColor="Gray"></DisabledStyle>
<PanelCollection>
<dx:PanelContent runat="server"><asp:UpdatePanel runat="server"
ID="UpdatePanel10" __designer:wfdid="w3"><ContentTemplate>
Input By : <dx:ASPxComboBox id="ASPxComboBox1" runat="server"
CssPostfix="Office2003Olive"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
__designer:wfdid="w4"
OnSelectedIndexChanged="ASPxComboBox1_SelectedIndexChanged"
AutoPostBack="True" ValueType="System.String"><Items>
<dx:ListEditItem Value="1" Text="Schedule"></dx:ListEditItem>
<dx:ListEditItem Value="0" Text="Non Schedule"></dx:ListEditItem>
</Items>
<LoadingPanelImage
Url="~/App_Themes/Office2003Olive/Web/Loading.gif"></LoadingPanelI
mage>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress1"
AssociatedUpdatePanelID="UpdatePanel10"
__designer:wfdid="w5"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress1" runat="server"
Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w6"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="#E2E8C9"></NoHeaderTopEdge>
</dx:ASPxRoundPanel>
145
</contenttemplate>
</asp:UpdatePanel></td>
</tr>
<tr>
<td colspan="3" valign="top"
style="width: 864px">
<asp:UpdatePanel
id="UpdatePanel9" runat="server">
<contenttemplate>
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
Width="100%" HeaderText="Input By Schedule" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
BackColor="White" __designer:wfdid="w7" Visible="False">
<TopEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif"></BackgroundImage>
</TopEdge>
<LeftEdge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif"></BackgroundImage>
</LeftEdge>
<HeaderContent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderContent>
<ContentPaddings Padding="14px"></ContentPaddings>
<RightEdge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif"></BackgroundImage
>
</RightEdge>
<HeaderRightEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderRightEdge>
<Border BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></Border>
<HeaderStyle BackColor="#E0EDFF">
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></BorderBottom>
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderLeftEdge>
<BottomEdge>
146
<BackgroundImage Repeat="RepeatX" VerticalPosition="Bottom"
ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif"></BackgroundImag
e>
</BottomEdge>
<PanelCollection>
<dx:PanelContent runat="server"><TABLE width="100%"><TBODY><TR><TD
style="WIDTH: 220px" vAlign=top><asp:Label runat="server"
Width="163px" ID="Caption9" __designer:wfdid="w9">Date
Visit</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel7"
__designer:wfdid="w10"><ContentTemplate>
<dx:ASPxComboBox id="inselldate" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w11"
OnSelectedIndexChanged="inselldate_SelectedIndexChanged"
AutoPostBack="True" ValueType="System.String" ShowShadow="False"
LoadingPanelImagePosition="Top">
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress1b"
AssociatedUpdatePanelID="UpdatePanel7"
__designer:wfdid="w12"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress1b" runat="server"
Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w13"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top>Store</TD><TD
style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel11b"
__designer:wfdid="w14"><ContentTemplate>
<dx:ASPxComboBox id="toko_kunjungan2" runat="server"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w15"
OnSelectedIndexChanged="toko_kunjungan_SelectedIndexChanged"
AutoPostBack="True" ValueType="System.String" ShowShadow="False"
LoadingPanelImagePosition="Top">
147
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox> 
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress122b"
AssociatedUpdatePanelID="UpdatePanel11b"
__designer:wfdid="w16"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress122b"
runat="server" Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w17"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption8"
__designer:wfdid="w18">Brand</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel5"
__designer:wfdid="w19"><ContentTemplate>
<dx:ASPxComboBox id="inproduct" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
DataSourceID="table_prod"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w20" ValueType="System.String"
ShowShadow="False" LoadingPanelImagePosition="Top"
EnableIncrementalFiltering="True" ValueField="ID"
TextField="PRODUCT_NAME">
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
148
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption6"
__designer:wfdid="w21">Mobile Promotor</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel6"
__designer:wfdid="w22"><ContentTemplate>
<dx:ASPxComboBox id="inmp" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w23" ValueType="System.String"
ShowShadow="False" LoadingPanelImagePosition="Top">
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption10"
__designer:wfdid="w24">Target</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel8"
__designer:wfdid="w25"><ContentTemplate>
<dx:ASPxTextBox id="intarget" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w26">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox> 
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Label4"
__designer:wfdid="w27">Comment</asp:Label>
149
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel13"
__designer:wfdid="w28"><ContentTemplate>
<asp:TextBox id="incomment" runat="server" __designer:wfdid="w29"
TextMode="MultiLine"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Text="Sell Quantity" Width="165px" ID="Label1"
__designer:wfdid="w30"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel4"
__designer:wfdid="w31"><ContentTemplate>
<dx:ASPxTextBox id="inqty" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w32">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR></TBODY></TABLE></dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="White">
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif"></Backgroun
dImage>
</NoHeaderTopEdge>
</dx:ASPxRoundPanel>
</contenttemplate>
</asp:UpdatePanel><asp:UpdatePanel id="UpdatePanel2"
runat="server"><contenttemplate>
<dx:ASPxRoundPanel id="ASPxRoundPanel1b" runat="server"
Width="100%" HeaderText="Input Non Schedul" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
BackColor="White" __designer:wfdid="w113" Visible="False">
<TopEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif"></BackgroundImage>
</TopEdge>
<LeftEdge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif"></BackgroundImage>
</LeftEdge>
<HeaderContent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderContent>
150
<ContentPaddings Padding="14px"></ContentPaddings>
<RightEdge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif"></BackgroundImage
>
</RightEdge>
<HeaderRightEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderRightEdge>
<Border BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></Border>
<HeaderStyle BackColor="#E0EDFF">
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></BorderBottom>
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderLeftEdge>
<BottomEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Bottom"
ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif"></BackgroundImag
e>
</BottomEdge>
<PanelCollection>
<dx:PanelContent runat="server"><TABLE width="100%"><TBODY><TR><TD
style="WIDTH: 220px" vAlign=top><asp:Label runat="server"
Width="163px" ID="Caption9b" __designer:wfdid="w35">Date
Visit</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel7b"
__designer:wfdid="w36"><ContentTemplate>
<dx:ASPxDateEdit id="inselldateb" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w37" AutoPostBack="True" ShowShadow="False">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<CalendarProperties>
<FooterStyle Spacing="17px"></FooterStyle>
<HeaderStyle Spacing="1px"></HeaderStyle>
</CalendarProperties>
<DropDownButton>
<Image>
151
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
</dx:ASPxDateEdit>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption8b"
__designer:wfdid="w38">Brand</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel5b"
__designer:wfdid="w39"><ContentTemplate>
<dx:ASPxComboBox id="inproductb" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
DataSourceID="table_prod"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w40" ValueType="System.String"
ShowShadow="False" LoadingPanelImagePosition="Top"
EnableIncrementalFiltering="True" ValueField="ID"
TextField="PRODUCT_NAME">
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top>Mall</TD><TD
style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel12"
__designer:wfdid="w41"><ContentTemplate>
<dx:ASPxComboBox id="mall_nosch" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w42"
OnSelectedIndexChanged="ASPxComboBox2_SelectedIndexChanged"
AutoPostBack="True" ValueType="System.String" ShowShadow="False"
LoadingPanelImagePosition="Top" EnableIncrementalFiltering="True">
<ButtonStyle Width="13px"></ButtonStyle>
<DropDownButton>
<Image>
152
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress131"
AssociatedUpdatePanelID="UpdatePanel12"
__designer:wfdid="w43"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress131"
runat="server" Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w44"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption2"
__designer:wfdid="w45">Store</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top></TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel11"
__designer:wfdid="w46"><ContentTemplate>
<dx:ASPxComboBox id="toko_kunjungan" runat="server"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w47"
OnSelectedIndexChanged="toko_kunjungan_SelectedIndexChanged"
AutoPostBack="True" ValueType="System.String" ShowShadow="False"
LoadingPanelImagePosition="Top">
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox> 
</ContentTemplate>
153
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress122"
AssociatedUpdatePanelID="UpdatePanel11"
__designer:wfdid="w48"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress122"
runat="server" Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w49"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption6b"
__designer:wfdid="w50">Mobile Promotor</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel6b"
__designer:wfdid="w51"><ContentTemplate>
<dx:ASPxComboBox id="inmpb" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w52" ValueType="System.String"
ShowShadow="False" LoadingPanelImagePosition="Top">
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption10b"
__designer:wfdid="w53">Target</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel8b"
__designer:wfdid="w54"><ContentTemplate>
<dx:ASPxTextBox id="intargetb" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w55">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox> 
</ContentTemplate>
</asp:UpdatePanel>
154
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Label4b"
__designer:wfdid="w56">Comment</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel13b"
__designer:wfdid="w57"><ContentTemplate>
<asp:TextBox id="incommentb" runat="server" __designer:wfdid="w58"
TextMode="MultiLine"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Text="Sell Quantity" Width="165px" ID="Label1b"
__designer:wfdid="w59"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel3"
__designer:wfdid="w60"><ContentTemplate>
<dx:ASPxTextBox id="inqtyb" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w61">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR></TBODY></TABLE></dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="White">
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif"></Backgroun
dImage>
</NoHeaderTopEdge>
</dx:ASPxRoundPanel>
</contenttemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td valign="top" colspan="3"
style="width: 864px">
<asp:UpdatePanel
id="UpdatePanel14" runat="server">
<contenttemplate>
<TABLE style="WIDTH: 264px"><TBODY><TR><TD style="WIDTH: 56px;
HEIGHT: 46px" colSpan=2><dx:ASPxButton id="ASPxButton2"
onclick="ASPxButton2_Click" runat="server" Width="100px"
CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
__designer:wfdid="w63" Visible="False"
Text="Save"></dx:ASPxButton></TD><TD style="WIDTH: 123px; HEIGHT:
46px"><dx:ASPxButton id="ASPxButton3" onclick="ASPxButton3_Click"
runat="server" Width="100px" CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
155
__designer:wfdid="w64" Visible="False"
Text="Save"></dx:ASPxButton></TD><TD style="WIDTH: 23px; HEIGHT:
46px"><dx:ASPxButton id="ASPxButton1" onclick="ASPxButton1_Click"
runat="server" Width="100px" CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
__designer:wfdid="w65" Visible="False"
Text="Cancel"></dx:ASPxButton></TD></TR></TBODY></TABLE>
</contenttemplate>
</asp:UpdatePanel>
<asp:SqlDataSource ID="table_prod" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" SelectCommand="SELECT ID, PRODUCT_NAME FROM ref_product WHERE
group_id IN (99999,99998)" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_mp" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>" >
</asp:SqlDataSource>
<asp:SqlDataSource ID="table_gridUtama"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand='SELECT "ID", "FL_ID",
"SALES_ID", "PRODUCT_ID",
"PRODUCT_NO", "COLLECT_DATE",
"COMP_ID", "SALES_AUTHORIZE" FROM
"DAILY_COLLECT_KG" ORDER BY "INPUT_DATE"
DESC'>
</asp:SqlDataSource><asp:SqlDataSource ID="Tabel_sch"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
></asp:SqlDataSource>
<asp:SqlDataSource ID="tb_mall"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource ID="tb_store"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource
ID="tb_store2" runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
</td>
</tr>
<tr>
156
<td colspan="3" valign="top"
style="width: 864px">
<hr color="#006fae" style="width: 101%" />
 </td>
</tr>
<tr>
<td colspan="3" valign="top"
style="width: 864px">
<asp:UpdatePanel id="UpdatePanel15"
runat="server">
<contenttemplate>
<dx:ASPxGridView id="ASPxGridView1" runat="server" Width="900px"
__designer:wfdid="w137" Visible="False"
OnRowDeleting="ASPxGridView1_RowDeleting"
OnRowUpdating="ASPxGridView1_RowUpdating" KeyFieldName="ID"
AutoGenerateColumns="False">
<SettingsPager Position="Top"></SettingsPager>
<Columns>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="0"><DataItemTemplate>
<a href="EditDailySaleOut.aspx?id_edit=<%#Eval ("ID")%>">Edit</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="1"><DataItemTemplate>
<a href="EditDailySaleOut.aspx?id_delete=<%#Eval
("ID")%>">Delete</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataTextColumn VisibleIndex="2" FieldName="SHELL_DATE"
Caption="Sell Date"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3" FieldName="EMP_NAME"
Caption="Mobile Promotor"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4"
FieldName="PRODUCT_NAME"
Caption="Product"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="5" FieldName="SALE_QTY"
Caption="Quantity"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="6" FieldName="CITY_NAME"
Caption="City"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="7" FieldName="PROV_NAME"
Caption="Province"></dx:GridViewDataTextColumn>
</Columns>
<SettingsEditing PopupEditFormHeight="300px"
PopupEditFormHorizontalAlign="Center" PopupEditFormModal="True"
PopupEditFormWidth="900px" PopupEditFormVerticalAlign="Middle"
Mode="PopupEditForm"></SettingsEditing>
<Settings ShowGroupPanel="True" ShowVerticalScrollBar="True"
ShowFilterRow="True" ShowHorizontalScrollBar="True"></Settings>
</dx:ASPxGridView>
</contenttemplate>
</asp:UpdatePanel><br />
<dx:ASPxButton ID="ASPxButton4"
runat="server"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
157
CssPostfix="Office2003Olive"
OnClick="ASPxButton4_Click"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
Text="Close Grid"
Visible="False" Width="100px">
</dx:ASPxButton>
<dx:ASPxButton ID="ASPxButton5"
runat="server"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
CssPostfix="Office2003Olive"
OnClick="ASPxButton5_Click"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
Text="Open Grid"
Width="100px">
</dx:ASPxButton>
</td>
</tr>
</table>
</dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="#EBF2F4">
</NoHeaderTopEdge>
<Content>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpContentBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</Content>
</dx:ASPxRoundPanel>
<!-- ======================== TABLE UTAMA
=========================== -->
<!-- ======================== BATAS AKHIR TABLE UTAMA
=========================== -->
</div>
</form>
</asp:Content>
DailySaleOut.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//using DevExpress.Web.ASPxEditors;
using CJM.Database.Oracle;
using System.Data.OracleClient;
using CJM.Reference;
using CJM.Project.LGE;
158
using DevExpress.Web.ASPxEditors;
public partial class AppModules_Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_USER_ID"] == null)
{
Response.Redirect("../LogOut.aspx");
}
//============================= cek caption
=================
//if (Session["SESS_LANG"] == "english")
//{
//
Caption6.Text = "Product Type";
//
Caption8.Text = "Product No.";
//
Caption9.Text = "Customer Name";
//
Caption10.Text = "Phone";
//
CaptionUtama.Text = "Daily Sell Out";
//}
//if (Session["SESS_LANG"] == "indonesia")
//{
//
Caption6.Text = "Tipe Produk";
//
Caption8.Text = "No. Produk";
//
Caption9.Text = "Nama Customer";
//
Caption10.Text = "Telephon";
//
CaptionUtama.Text = "Daily Sell Out";
//}
bindDataRowFilter();
}
protected void ASPxComboBox1_SelectedIndexChanged(object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string pilih =
ASPxComboBox1.SelectedItem.Value.ToString();
if(pilih == "1")
{
ASPxRoundPanel1.Visible = true;
ASPxRoundPanel1b.Visible = false;
ASPxButton2.Visible = true;
ASPxButton3.Visible = false;
ASPxButton1.Visible = true;
//===================== Schedule date
Tabel_sch.SelectCommand = "SELECT DISTINCT
TO_CHAR(DATE_SCHED, 'DD/MM/YYYY') as Date_sch " +
"FROM EMP_SALES_SCHED
" +
159
"ORDER BY 1
DESC";
inselldate.DataSource = Tabel_sch;
inselldate.TextField = "Date_sch";
inselldate.ValueField = "Date_sch";
inselldate.DataBind();
inselldate.Items.Insert(0, new ListEditItem("-- chose
--", " "));
}
else
{
ASPxRoundPanel1b.Visible = true;
ASPxRoundPanel1.Visible = false;
ASPxButton1.Visible = true;
ASPxButton3.Visible = true;
ASPxButton2.Visible = false;
//===================== Store
tb_mall.SelectCommand = "SELECT ID, MALL_NAME FROM " +
"GNRL_REF_MALL ";
mall_nosch.DataSource = tb_mall;
mall_nosch.TextField = "MALL_NAME";
mall_nosch.ValueField = "ID";
mall_nosch.DataBind();
mall_nosch.Items.Insert(0, new ListEditItem("-- chose
--", " "));
}
}
protected void inselldate_SelectedIndexChanged(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string visitdate = inselldate.SelectedItem.Text;
//================ Mobile Promotor
table_mp.SelectCommand = "SELECT DISTINCT a.SALES_ID,
b.EMP_NAME FROM " +
"EMP_SALES_SCHED a,
EMP_SALES_OFFICER b " +
"WHERE a.DATE_SCHED =
'" + visitdate + "'"+
"AND a.SALES_ID = b.ID
AND a.INACTIVE = 'N' " +
"ORDER BY
b.EMP_NAME DESC";
inmp.DataSource = table_mp;
inmp.TextField = "EMP_NAME";
inmp.ValueField = "SALES_ID";
inmp.DataBind();
inmp.Items.Insert(0, new ListEditItem("-- chose --", ""));
160
//===================== Store
tb_store2.SelectCommand = "SELECT a.ID, a.STORE_NAME FROM
" +
"GNRL_REF_STORE a,
EMP_SALES_SCHED b where a.ID = b.STORE_ID AND b.DATE_SCHED = '" +
visitdate + "' ";
toko_kunjungan2.DataSource = tb_store2;
toko_kunjungan2.TextField = "STORE_NAME";
toko_kunjungan2.ValueField = "ID";
toko_kunjungan2.DataBind();
toko_kunjungan2.Items.Insert(0, new ListEditItem("-- chose
--", " "));
}
protected void toko_kunjungan_SelectedIndexChanged(object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string storid =
toko_kunjungan.SelectedItem.Value.ToString();
//================ Mobile Promotor
table_mp.SelectCommand = "SELECT w.sales_id, o.emp_name "
+
"FROM emp_sales_workarea
w,emp_sales_officer o
" +
"WHERE w.city_id IN
(SELECT city_id FROM gnrl_ref_store WHERE id= " + storid + " ) " +
"AND w.sales_id =
o.id";
inmpb.DataSource = table_mp;
inmpb.TextField = "EMP_NAME";
inmpb.ValueField = "SALES_ID";
inmpb.DataBind();
inmpb.Items.Insert(0, new ListEditItem("-- chose --", ""));
}
protected void ASPxComboBox2_SelectedIndexChanged(object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
//===================== Store
string mallid = mall_nosch.SelectedItem.Value.ToString();
tb_store.SelectCommand = "SELECT ID, STORE_NAME FROM " +
"GNRL_REF_STORE where
ID_MALL = " + mallid + " ";
toko_kunjungan.DataSource = tb_store;
toko_kunjungan.TextField = "STORE_NAME";
toko_kunjungan.ValueField = "ID";
toko_kunjungan.DataBind();
161
toko_kunjungan.Items.Insert(0, new ListEditItem("-- chose
--", " "));
}
private void bindDataRowFilter()
{
string query = "SELECT a.ID, a.sale_qty, SUBSTR
(a.shell_date, 0, 10) shell_date, " +
"a.sales_id, a.product_id, " +
"b.emp_name, d.city_name, e.prov_name,
c.product_name " +
"FROM daily_shellout a, " +
"emp_sales_officer b, " +
"ref_product c, " +
"gnrl_ref_city d, " +
"gnrl_ref_province e " +
"WHERE a.sales_id = b.ID " +
"AND a.product_id = c.ID " +
"AND b.city_id = d.ID " +
"AND b.prov_id = e.ID " +
"GROUP BY a.shell_date, " +
"a.ID, " +
"a.sale_qty, " +
"a.sales_id, " +
"a.product_id, " +
"b.emp_name, " +
"d.city_name, " +
"e.prov_name, " +
"c.product_name";
OracleDataAdapter ad = new OracleDataAdapter(query,
ConnOracle.ConnOra());
DataSet ds = new DataSet();
ad.Fill(ds);
ASPxGridView1.DataSource = ds;
ASPxGridView1.DataBind();
}
// ======== save with schedule ============= //
protected void ASPxButton2_Click(object sender, EventArgs e)
{
string oinselldate = inselldate.Text;
string oinmp = inmp.SelectedItem.Value.ToString();
string oinproduct =
inproduct.SelectedItem.Value.ToString();
string ointarget = intarget.Text;
string oincomment = incomment.Text;
string oinqty = inqty.Text;
string myQueryCity = "INSERT INTO DAILY_SHELLOUT" +
" (SHELL_DATE, SALES_ID, PRODUCT_ID,
TARGET, COMMENTS, SALE_QTY, INPUT_BY,UPDATE_BY,COMP_ID)" +
" VALUES (" +
"'" + oinselldate + "'," +
"'" + oinmp + "'," +
162
"'"
"'"
"'"
"'"
"'"
+
+
+
+
+
oinproduct + "'," +
ointarget + "'," +
oincomment + "', " +
oinqty + "', " +
Session["SESS_USER_ID"] + "',"
+
"'" + Session["SESS_USER_ID"] + "',"
+
"" + Session["SESS_COMP_ID"] + "" +
")";
bool suksesInsertCity =
ConnOracle.ExecNonQueryConnOra(myQueryCity);
if (suksesInsertCity)
{
inselldate.Text = "";
inmp.SelectedItem.Text = "";
inproduct.SelectedItem.Text = "";
intarget.Text = "";
incomment.Text = "";
inqty.Text = "";
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Success.')\", 0);", true);
}
else
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed.')\", 0);", true);
}
}
protected void ASPxButton3_Click(object sender, EventArgs e)
{
string oinselldate = ForNET.DateToDB(inselldateb.Text);
string oinmp = inmpb.SelectedItem.Value.ToString();
string oinproduct =
inproductb.SelectedItem.Value.ToString();
string ointarget = intargetb.Text;
string oincomment = incommentb.Text;
string oinqty = inqtyb.Text;
string otoko_kunjungan =
toko_kunjungan.SelectedItem.Value.ToString();
string myQueryCity = "INSERT INTO DAILY_SHELLOUT" +
" (SHELL_DATE, SALES_ID, PRODUCT_ID,
TARGET, COMMENTS, SALE_QTY, INPUT_BY,UPDATE_BY,COMP_ID)" +
" VALUES (" +
"" + oinselldate + "," +
"'" + oinmp + "'," +
"'" + oinproduct + "'," +
"'" + ointarget + "'," +
"'" + oincomment + "', " +
"'" + oinqty + "', " +
163
"'" + Session["SESS_USER_ID"] + "',"
+
"'" + Session["SESS_USER_ID"] + "',"
+
"" + Session["SESS_COMP_ID"] + "" +
")";
bool suksesInsertCity =
ConnOracle.ExecNonQueryConnOra(myQueryCity);
if (suksesInsertCity)
{
string myQueryCitys = "INSERT INTO EMP_SALES_SCHED" +
"
(SALES_ID,DATE_SCHED,STORE_ID,INPUT_BY,UPDATE_BY,COMP_ID)" +
" VALUES (" +
"'" + oinmp + "'," +
"" + oinselldate + ", " +
"'" + otoko_kunjungan + "'," +
"'" + Session["SESS_USER_ID"] + "'," +
"'" + Session["SESS_USER_ID"] + "'," +
"" + Session["SESS_COMP_ID"] + "" +
")";
bool suksesInsertCitys =
ConnOracle.ExecNonQueryConnOra(myQueryCitys);
if (suksesInsertCitys)
{
inselldateb.Text = "";
inmpb.SelectedItem.Text = "";
inproductb.SelectedItem.Text = "";
intargetb.Text = "";
incommentb.Text = "";
inqtyb.Text = "";
toko_kunjungan.SelectedItem.Text = "";
mall_nosch.SelectedItem.Text = "";
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Success.')\", 0);", true);
}
else
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed.')\", 0);", true);
}
}
else
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed.')\", 0);", true);
}
}
protected void ASPxButton1_Click(object sender, EventArgs e)
{
164
Response.Redirect("Default.aspx");
}
protected void ASPxGridView1_RowUpdating(object sender,
DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
{
e.Cancel = true;
Response.Redirect("EditRDailySaleOut.aspx?id_edit=" +
e.Keys);
}
protected void ASPxGridView1_RowDeleting(object sender,
DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
{
e.Cancel = true;
Response.Redirect("EditRDailySaleOut.aspx?id_delete=" +
e.Keys);
}
//=============== event open grid
protected void ASPxButton5_Click(object sender, EventArgs e)
{
ASPxGridView1.Visible = true;
ASPxButton5.Visible = false;
ASPxButton4.Visible = true;
}
//============ event close grid
protected void ASPxButton4_Click(object sender, EventArgs e)
{
ASPxGridView1.Visible = false;
ASPxButton5.Visible = true;
ASPxButton4.Visible = false;
}
}
Default.aspx
<%@ Page Language="C#" MasterPageFile="MasterPage.master"
AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" Title="Sales Management System" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content_main"
Runat="Server">
<dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server"
CssFilePath="~/App_Themes/Silver/{0}/styles.css"
165
CssPostfix="Silver" HeaderText="Main"
Width="200px" ImageFolder="~/App_Themes/Silver/{0}/"
ShowDefaultImages="False" ShowHeader="False">
<Border BorderWidth="1px" BorderStyle="Solid"
BorderColor="#D7D7D7"></Border>
<BottomEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Silver/Web/rpBottomBack.gif"
Repeat="RepeatX" />
</BottomEdge>
<PanelCollection>
<dx:PanelContent runat="server"><TABLE style="BORDER-TOP-WIDTH:
thin; BORDER-LEFT-WIDTH: thin; BORDER-LEFT-COLOR: gainsboro;
BORDER-BOTTOM-WIDTH: thin; BORDER-BOTTOM-COLOR: gainsboro; BORDERTOP-COLOR: gainsboro; HEIGHT: 270px; BORDER-RIGHT-WIDTH: thin;
BORDER-RIGHT-COLOR: gainsboro" cellSpacing=0 cellPadding=20
width=895 align=left><TBODY><TR><TD style="HEIGHT: 510px"
vAlign=top align=center><BR /><BR /><BR /><asp:Image
runat="server" ImageAlign="AbsMiddle" ID="Image1"
ImageUrl="~/images/mainpic.jpg"></asp:Image>
<BR /><BR /><STRONG><SPAN style="FONT-SIZE: 24pt; COLOR:
gray"><SPAN style="COLOR: dimgray"><asp:Label runat="server"
ID="Label1"></asp:Label>
</SPAN> <SPAN style="COLOR: highlight"><asp:Label runat="server"
ID="Label2"></asp:Label>
</SPAN></SPAN></STRONG></TD></TR></TBODY></TABLE></dx:PanelContent
>
</PanelCollection>
<BottomRightCorner Height="10px"
Url="~/App_Themes/Silver/Web/rpBottomRightCorner.gif"
Width="6px">
</BottomRightCorner>
<TopRightCorner Height="6px"
Url="~/App_Themes/Silver/Web/rpTopRightCorner.gif" Width="6px">
</TopRightCorner>
<BorderBottom BorderWidth="0px" />
<TopLeftCorner Height="6px"
Url="~/App_Themes/Silver/Web/rpTopLeftCorner.gif" Width="6px">
</TopLeftCorner>
<BackgroundImage
ImageUrl="~/App_Themes/Silver/Web/rpContentBack.gif"
Repeat="RepeatX" />
<BottomLeftCorner Height="10px"
Url="~/App_Themes/Silver/Web/rpBottomLeftCorner.gif"
Width="6px">
</BottomLeftCorner>
</dx:ASPxRoundPanel>
</asp:Content>
Default.aspx.cs
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
166
using
using
using
using
using
using
using
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml;
System.Text;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_USER_ID"] == null)
{
// bersihkan sampah/session sebelum logout
//Session["SESS_USER_ID"] = null;
//Session["SESS_COMP_ID"] = null;
//Session["SESS_USER_NAME"] = null;
//Session.RemoveAll();
//Session.Clear();
Response.Redirect("../Default.aspx");
}
else
{
if (Session["SESS_LANG"].ToString() == "indonesia")
{
Label1.Text = "Selamat Datang di";
Label2.Text = " Sales Management System";
}
if (Session["SESS_LANG"].ToString() == "english")
{
Label1.Text = "Welcome ";
Label2.Text = " Sales Management System";
}
}
}
}
EditDailySaleOut.aspx
<%--<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="RegistrasiOwner.aspx.cs" Inherits="AppModules_Default2"
%>
--%>
<%@ Page Language="C#" MasterPageFile="MasterPage.master"
AutoEventWireup="true" CodeFile="EditDailySaleOut.aspx.cs"
Inherits="AppModules_Default2" Title="Sales Management System"
EnableEventValidation ="false" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
167
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxUploadControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
<div style="text-align: left">
<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Label ID="CaptionUtama" runat="server"
Width="450px" BackColor="White" Font-Size="Large"
ForeColor="SteelBlue" Visible="False"></asp:Label>
<dx:ASPxRoundPanel ID="ASPxRoundPanel3" runat="server"
BackColor="#EBF2F4"
CssFilePath="~/App_Themes/Glass/{0}/styles.css"
CssPostfix="Glass" HeaderText="Edit Daily Sell Out"
SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css"
Width="200px">
<LeftEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</LeftEdge>
<HeaderContent>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</HeaderContent>
<ContentPaddings PaddingBottom="10px"
PaddingLeft="4px" PaddingTop="10px" />
<RightEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</RightEdge>
<HeaderRightEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderRightEdge.gif"
VerticalPosition="bottom" />
</HeaderRightEdge>
<Border BorderColor="#7EACB1" BorderStyle="Solid"
BorderWidth="1px" />
168
<HeaderStyle BackColor="White" Height="23px">
<BorderBottom BorderStyle="None" />
<Paddings PaddingBottom="0px" PaddingLeft="2px"
PaddingTop="0px" />
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderLeftEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</HeaderLeftEdge>
<BottomEdge BackColor="#D7E9F1">
</BottomEdge>
<PanelCollection>
<dx:PanelContent runat="server">
<table width="950">
<tr>
<td colspan="3" valign="top"
style="width: 864px; height: 181px;">
<asp:UpdatePanel
id="UpdatePanel9" runat="server">
<contenttemplate>
<TABLE width="100%"><TBODY><TR><TD style="WIDTH: 220px" vAlign=top
align=right><asp:Label id="Caption9" runat="server" Width="163px"
__designer:wfdid="w212">Date Visit</asp:Label> </TD><TD
style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel id="UpdatePanel7" runat="server"
__designer:wfdid="w213"><ContentTemplate>
<dx:ASPxComboBox id="inselldate" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w239" ValueType="System.String"
AutoPostBack="True"
OnSelectedIndexChanged="inselldate_SelectedIndexChanged"
LoadingPanelImagePosition="Top" ShowShadow="False">
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel> <asp:UpdateProgress id="UpdateProgress1b"
runat="server" __designer:wfdid="w215"
AssociatedUpdatePanelID="UpdatePanel7"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress1b" runat="server"
Width="150px" ImageUrl="~/images/wait.gif"
169
__designer:wfdid="w240"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress> </TD></TR><TR><TD style="WIDTH: 220px"
vAlign=top align=right>Store</TD><TD style="WIDTH: 7px"
vAlign=top>:</TD><TD vAlign=top><asp:UpdatePanel
id="UpdatePanel11b" runat="server"
__designer:wfdid="w217"><ContentTemplate>
<dx:ASPxComboBox id="toko_kunjungan2" runat="server"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w241" ValueType="System.String"
AutoPostBack="True"
OnSelectedIndexChanged="toko_kunjungan_SelectedIndexChanged"
LoadingPanelImagePosition="Top" ShowShadow="False">
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox> 
</ContentTemplate>
</asp:UpdatePanel> <asp:UpdateProgress id="UpdateProgress122b"
runat="server" __designer:wfdid="w219"
AssociatedUpdatePanelID="UpdatePanel11b"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress122b"
runat="server" Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w242"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress> </TD></TR><TR><TD style="WIDTH: 220px"
vAlign=top align=right><asp:Label id="Caption8" runat="server"
Width="163px" __designer:wfdid="w221">Brand</asp:Label> </TD><TD
style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel id="UpdatePanel5" runat="server"
__designer:wfdid="w222"><ContentTemplate>
<dx:ASPxComboBox id="inproduct" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
DataSourceID="table_prod"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w243" ValueType="System.String"
LoadingPanelImagePosition="Top" ShowShadow="False"
TextField="PRODUCT_NAME" ValueField="PRODUCT_ID"
EnableIncrementalFiltering="True">
<DropDownButton>
<Image>
170
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel> </TD></TR><TR><TD style="WIDTH: 220px"
vAlign=top align=right><asp:Label id="Caption6" runat="server"
Width="163px" __designer:wfdid="w224">Mobile Promotor</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel id="UpdatePanel6" runat="server"
__designer:wfdid="w225"><ContentTemplate>
<asp:DropDownList id="inmp" runat="server"
__designer:wfdid="w251"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel> </TD></TR><TR><TD style="WIDTH: 220px"
vAlign=top align=right><asp:Label id="Caption10" runat="server"
Width="163px" __designer:wfdid="w227">Target</asp:Label> </TD><TD
style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel id="UpdatePanel8" runat="server"
__designer:wfdid="w228"><ContentTemplate>
<dx:ASPxTextBox id="intarget" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w245">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox> 
</ContentTemplate>
</asp:UpdatePanel> </TD></TR><TR><TD style="WIDTH: 220px"
vAlign=top align=right><asp:Label id="Label4" runat="server"
Width="163px" __designer:wfdid="w230">Comment</asp:Label> </TD><TD
style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel id="UpdatePanel13" runat="server"
__designer:wfdid="w231"><ContentTemplate>
<asp:TextBox id="incomment" runat="server" __designer:wfdid="w246"
TextMode="MultiLine"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel> </TD></TR><TR><TD style="WIDTH: 220px"
vAlign=top align=right><asp:Label id="Label1" runat="server"
Width="165px" __designer:wfdid="w233" Text="Sell
Quantity"></asp:Label> </TD><TD style="WIDTH: 7px"
vAlign=top>:</TD><TD vAlign=top><asp:UpdatePanel id="UpdatePanel4"
runat="server" __designer:wfdid="w234"><ContentTemplate>
171
<dx:ASPxTextBox id="inqty" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w247">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox>
</ContentTemplate>
</asp:UpdatePanel> </TD></TR></TBODY></TABLE><BR /><BR /> 
</contenttemplate>
</asp:UpdatePanel><asp:UpdatePanel ID="UpdatePanel14"
runat="server"><contenttemplate>
<TABLE style="WIDTH: 264px"><TR><TD style="WIDTH: 56px; HEIGHT:
46px" colSpan=2><dx:ASPxButton id="ASPxButton2"
onclick="ASPxButton2_Click" runat="server" Width="100px"
CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
Text="Update"></dx:ASPxButton></TD><TD style="HEIGHT: 46px"
colSpan=2><dx:ASPxButton id="ASPxButton1"
onclick="ASPxButton1_Click" runat="server" Width="100px"
CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
Text="Cancel"></dx:ASPxButton></TD></TR></TABLE>
</contenttemplate>
</asp:UpdatePanel><asp:SqlDataSource ID="table_prod"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand="SELECT DISTINCT "PRODUCT_ID",
"PRODUCT_NAME" FROM "V_SHELLOUT" ORDER BY
"PRODUCT_NAME"" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_mp" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>" >
</asp:SqlDataSource>
<asp:SqlDataSource ID="table_gridUtama"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand='SELECT "ID", "FL_ID",
"SALES_ID", "PRODUCT_ID",
"PRODUCT_NO", "COLLECT_DATE",
"COMP_ID", "SALES_AUTHORIZE" FROM
"DAILY_COLLECT_KG" ORDER BY "INPUT_DATE"
DESC'>
</asp:SqlDataSource><asp:SqlDataSource ID="Tabel_sch"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
172
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
></asp:SqlDataSource>
<asp:SqlDataSource ID="tb_mall"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource ID="tb_store"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource
ID="tb_store2" runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
</td>
</tr>
</table>
</dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="#EBF2F4">
</NoHeaderTopEdge>
<Content>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpContentBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</Content>
</dx:ASPxRoundPanel>
<!-- ======================== TABLE UTAMA
=========================== -->
<!-- ======================== BATAS AKHIR TABLE UTAMA
=========================== -->
</div>
</form>
</asp:Content>
EditDailySaleOut.aspx.cs
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
173
using System.Web.UI.HtmlControls;
//using DevExpress.Web.ASPxEditors;
using CJM.Database.Oracle;
using System.Data.OracleClient;
using CJM.Reference;
using CJM.Project.LGE;
using DevExpress.Web.ASPxEditors;
public partial class AppModules_Default2 : System.Web.UI.Page
{
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = buzdomain.com)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =blitz.buzdomain.com))); User
Id=buzapps; password=qwerty007;";
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = blitz.co.id)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =buzdev))); User Id=buzapps;
password=qwerty007;";
string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =xronosit))); User
Id=buzapps; password=qwerty007;";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string idmenu = "26";
string iduser = Session["SESS_USER_ID"].ToString();
string batasan = RefDB.editVal(iduser, idmenu);
string edit = Convert.ToString(Request["id_edit"]);
string delete =
Convert.ToString(Request["id_delete"]);
if (batasan == "Y")
{
if ((edit != null) && (delete == null))
{
OracleConnection conn = new
OracleConnection();
conn.ConnectionString = oradb;
if (Session["SESS_USER_ID"] == null)
{
Response.Redirect("../LogOut.aspx");
}
if ((edit != "") && (batasan == "Y"))
{
Tabel_sch.SelectCommand = "SELECT DISTINCT
TO_CHAR(DATE_SCHED, 'DD/MM/YYYY') as Date_sch " +
"FROM EMP_SALES_SCHED " +
"ORDER BY 1 DESC";
174
inselldate.DataSource = Tabel_sch;
inselldate.TextField = "Date_sch";
inselldate.ValueField = "Date_sch";
inselldate.DataBind();
try
{
conn.Open();
string query = "SELECT " +
"D.ID, D.SHELL_DATE,
D.SALES_ID, " +
"D.PRODUCT_ID,
D.TARGET, D.INPUT_BY, " +
"D.INPUT_DATE,
D.UPDATE_BY, D.UPDATE_DATE, " +
"D.COMP_ID, D.COMMENTS,
D.SALE_QTY, " +
"D.TEMPCOL, E.EMP_NAME
" +
"FROM DAILY_SHELLOUT D,
EMP_SALES_OFFICER E" +
" Where " +
"D.ID = '" + edit + "' AND
D.SALES_ID = E.ID";
OracleCommand cmd = new
OracleCommand(query, conn);
OracleDataReader ds =
cmd.ExecuteReader();
if (ds.HasRows == false)
{
throw new Exception();
}
if (ds.Read())
{
inselldate.Value =
ForNET.DateFromDB(ds["SHELL_DATE"].ToString());
string InMPTR =
ds["SALES_ID"].ToString();
string InMPTRname =
ds["EMP_NAME"].ToString();
string datefrom =
ForNET.DateFromDB(ds["SHELL_DATE"].ToString());
string dateto =
ForNET.DateToDB(datefrom.ToString());
table_mp.SelectCommand = "SELECT
DISTINCT a.SALES_ID, b.EMP_NAME FROM " +
175
"EMP_SALES_SCHED a,
EMP_SALES_OFFICER b " +
"WHERE a.DATE_SCHED = " +
dateto + "" +
"AND a.SALES_ID = b.ID AND
a.INACTIVE = 'N' " +
"ORDER BY b.EMP_NAME
DESC";
inmp.DataSource = table_mp;
inmp.DataTextField = "EMP_NAME";
inmp.DataValueField = "SALES_ID";
inmp.DataBind();
inmp.Items.Insert(0, new
ListItem(InMPTRname, InMPTR));
inproduct.Value =
ds["PRODUCT_ID"].ToString();
intarget.Value =
ds["TARGET"].ToString();
incomment.Text =
ds["COMMENTS"].ToString();
inqty.Value =
ds["SALE_QTY"].ToString();
}
}
catch (Exception)
{
}
finally
{
conn.Dispose();
}
}
if ((edit == null) && (delete != null))
{
string QUERYDELETE = "DELETE
DAILY_SHELLOUT WHERE ID = '" + delete + "'";
bool SUKSESDELETE =
ConnOracle.ExecNonQueryConnOra(QUERYDELETE);
if ((delete != "") && (SUKSESDELETE))
{
ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Delete Success'); window.location.href =
'DailySaleOut.aspx';", true);
}
else
{
ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
176
"alert('Delete Failed'); window.location.href =
'DailySaleOut.aspx';", true);
}
}
}
else
{
ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Maaf pada halaman ini anda tidak memiliki akses Update');
window.location.href = 'DailySaleOut.aspx';", true);
//Alert.Show("Maaf pada halaman ini anda tidak
memiliki akses Update");
}
}
}
}
protected void inselldate_SelectedIndexChanged(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string visitdate = inselldate.SelectedItem.Text;
//===================== Store
tb_store2.SelectCommand = "SELECT a.ID, a.STORE_NAME FROM
" +
"GNRL_REF_STORE a,
EMP_SALES_SCHED b where a.ID = b.STORE_ID AND b.DATE_SCHED = '" +
visitdate + "' ";
toko_kunjungan2.DataSource = tb_store2;
toko_kunjungan2.TextField = "STORE_NAME";
toko_kunjungan2.ValueField = "ID";
toko_kunjungan2.DataBind();
toko_kunjungan2.Items.Insert(0, new ListEditItem("-- chose
--", " "));
}
protected void toko_kunjungan_SelectedIndexChanged(object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string storid =
toko_kunjungan2.SelectedItem.Value.ToString();
//================ Mobile Promotor
177
table_mp.SelectCommand = "SELECT w.sales_id, o.emp_name "
+
"FROM emp_sales_workarea
w,emp_sales_officer o
" +
"WHERE w.city_id IN
(SELECT city_id FROM gnrl_ref_store WHERE id= " + storid + " ) " +
"AND w.sales_id =
o.id";
inmp.DataSource = table_mp;
inmp.DataTextField = "EMP_NAME";
inmp.DataValueField = "SALES_ID";
inmp.DataBind();
inmp.Items.Insert(0, new ListItem("-- chose --", "-"));
}
// ======== save with schedule ============= //
protected void ASPxButton2_Click(object sender, EventArgs e)
{
string oinselldate = inselldate.Text;
string oinmp = inmp.SelectedItem.Value.ToString();
string oinproduct =
inproduct.SelectedItem.Value.ToString();
string ointarget = intarget.Text;
string oincomment = incomment.Text;
string oinqty = inqty.Text;
string ProcEdit = Convert.ToString(Request["id_edit"]);
string myQueryCity = "UPDATE DAILY_SHELLOUT SET" +
"SHELL_DATE
= '" + oinselldate +
"', " +
"SALES_ID
= '" + oinmp + "', "
"PRODUCT_ID
= '" + oinproduct +
"TARGET
= '" + ointarget +
"COMMENTS
= '" + oincomment +
"SALE_QTY
= '" + oinqty + "',
"UPDATE_BY
= '" +
+
"', " +
"', " +
"', " +
" +
Session["SESS_USER_ID"] + "'," +
"COMP_ID
= " +
Session["SESS_COMP_ID"] + "" +
"WHERE ID = " + ProcEdit + "";
bool suksesInsertCity =
ConnOracle.ExecNonQueryConnOra(myQueryCity);
if (suksesInsertCity)
{
inselldate.Text = "";
inmp.SelectedItem.Text = "";
inproduct.SelectedItem.Text = "";
intarget.Text = "";
incomment.Text = "";
178
inqty.Text = "";
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "MessagePopUp", "alert('Update Success');
window.location.href = 'DailySaleOut.aspx';", true);
}
else
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "MessagePopUp", "alert('Update Failed');
window.location.href = 'DailySaleOut.aspx';", true);
}
}
protected void ASPxButton1_Click(object sender, EventArgs e)
{
Response.Redirect("DailySaleOut.aspx");
}
}
EditForm.aspx
<%--<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="EditForm.aspx.cs" Inherits="AppModules_EditForm" %>
--%>
<%@ Page EnableEventValidation ="false" Language="C#"
MasterPageFile="MasterPage.master" AutoEventWireup="true"
CodeFile="EditForm.aspx.cs" Inherits="AppModules_EditForm"
Title="Sales Management System" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<asp:Content ID="Content_Main"
ContentPlaceHolderID="Content_Main" Runat="Server">
<asp:SqlDataSource ID="sdsPropinsi" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
179
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource ID="sdsKota" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource ID="sdsMall" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource ID="sdsToko" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<div id="layout">
<div id="textnav"></div>
<div id="content"><div id="main">
<dl style="display: none;"><dt>Expression
Evaluations:<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
BackColor="#EBF2F4"
CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass"
HeaderText="Store Registration"
SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css"
Width="200px">
<leftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"></Background
Image>
</leftedge>
<headercontent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpHeaderBack.gif"></BackgroundIma
ge>
</headercontent>
<contentpaddings PaddingBottom="10px"
PaddingLeft="4px" PaddingTop="10px"></contentpaddings>
<rightedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"></Background
Image>
</rightedge>
<headerrightedge>
<BackgroundImage VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpHeaderRightEdge.gif"></Backgrou
ndImage>
</headerrightedge>
<border bordercolor="#7EACB1"
borderstyle="Solid" borderwidth="1px"></border>
<headerstyle backcolor="White"
Height="23px">
<BorderBottom BorderStyle="None"></BorderBottom>
<Paddings PaddingBottom="0px"
PaddingLeft="2px" PaddingTop="0px" />
180
</headerstyle>
<headerleftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpHeaderLeftEdge.gif"></Backgroun
dImage>
</headerleftedge>
<bottomedge BackColor="#D7E9F1">
</bottomedge>
<panelcollection>
<dx:PanelContent runat="server"><form runat="server" ID="form1"
style="WIDTH: 871px"><asp:ScriptManager runat="server"
ID="ScriptManager1"></asp:ScriptManager>
<FIELDSET style="WIDTH: 900px"><LEGEND>Informasi Karyawan
Toko</LEGEND><DIV style="WIDTH: 181px" class="notes"><H4>Informasi
Karyawan Toko</H4><P class="last">Masukan data dengan
benar.</P></DIV><TABLE cellSpacing=5><TBODY><TR><TD style="WIDTH:
144px">NO. HP:</TD><TD style="WIDTH: 335px"><asp:UpdatePanel
runat="server" ID="UpdatePanel1"><ContentTemplate>
<asp:TextBox id="noHP" runat="server" CssClass="inputText"
Width="152px"></asp:TextBox><A
href="javascript:NewCal('txtTglLahir','ddmmyyyy')"> </A>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD></TD></TR><TR><TD style="WIDTH: 144px">Nama
Lengkap:</TD><TD style="WIDTH: 335px"><asp:UpdatePanel
runat="server" ID="UpdatePanelNamaLengkap"><ContentTemplate>
<asp:TextBox id="namaLengkap" runat="server"
CssClass="inputText"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD></TD></TR><TR><TD style="WIDTH: 144px">Jenis
Kelamin:</TD><TD style="WIDTH: 335px"><asp:UpdatePanel
runat="server" ID="UpdatePanelJenkel"><ContentTemplate>
<asp:DropDownList id="ddlJenisKelamin" runat="server"
CssClass="inputText" Width="208px" AppendDataBoundItems="True">
<asp:ListItem Value="-PILIH--">--PILIH--</asp:ListItem>
<asp:ListItem
Value="L">LAKI-LAKI</asp:ListItem>
<asp:ListItem
Value="P">PEREMPUAN</asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD></TD></TR><TR><TD style="WIDTH: 144px">Tanggal
Lahir:</TD><TD style="WIDTH: 335px"><asp:UpdatePanel
runat="server" ID="UpdatePanelTglLahir"><ContentTemplate>
<dx:ASPxDateEdit id="txtTglLahir" runat="server"
SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css"
CssPostfix="Glass"
CssFilePath="~/App_Themes/Glass/{0}/styles.css">
<ButtonStyle Width="13px">
</ButtonStyle>
<ValidationSettings>
<ErrorFrameStyle
ImageSpacing="4px">
<ErrorTextPaddings
PaddingLeft="4px" />
</ErrorFrameStyle>
181
</ValidationSettings>
<CalendarProperties>
<FooterStyle
Spacing="4px" ></FooterStyle>
<HeaderStyle
Spacing="1px" ></HeaderStyle>
</CalendarProperties>
</dx:ASPxDateEdit>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD></TD></TR><TR><TD style="WIDTH: 144px">Alamat:</TD><TD
style="WIDTH: 335px"><asp:UpdatePanel runat="server"
ID="UpdatePanelAlamatKaryawan"><ContentTemplate>
<asp:TextBox id="txtAlamatOwner" runat="server"
CssClass="inputText" Width="412px" Height="50px"
TextMode="MultiLine" Rows="2"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD></TD></TR></TBODY></TABLE></FIELDSET> <FIELDSET
style="WIDTH: 900px"><LEGEND>Informasi Toko dan Pemilik
Toko</LEGEND><DIV style="WIDTH: 237px" class="notes"><H4>Informasi
Toko dan Pemilik Toko</H4><P class="last">Masukan data dengan
benar.</P></DIV><TABLE cellSpacing=5><TBODY><TR><TD style="WIDTH:
144px">Propinsi:</TD><TD style="WIDTH: 335px"><asp:UpdatePanel
runat="server" ID="UpdatePanelProvince"><ContentTemplate>
<asp:DropDownList id="ddlPropinsi" runat="server" Width="208px"
OnSelectedIndexChanged="ddlPropinsi_SelectedIndexChanged"
AutoPostBack="True">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD></TD></TR><TR><TD style="WIDTH: 144px">Kota:</TD><TD
style="WIDTH: 335px"><asp:UpdatePanel runat="server"
ID="UpdatePanelCity"><ContentTemplate>
<asp:DropDownList id="ddlKota" runat="server" Width="208px"
OnSelectedIndexChanged="ddlKota_SelectedIndexChanged"
AutoPostBack="True">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD></TD></TR><TR><TD style="WIDTH: 144px">Mall:</TD><TD
style="WIDTH: 335px"><asp:UpdatePanel runat="server"
ID="UpdatePanelMall"><ContentTemplate>
<asp:DropDownList id="ddlMall" runat="server" Width="208px"
OnSelectedIndexChanged="ddlMall_SelectedIndexChanged"
AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD></TD></TR><TR><TD style="WIDTH: 144px; height:
92px;">Nama Toko/Dealer:</TD><TD style="WIDTH: 335px; height:
92px;"><asp:UpdatePanel runat="server"
ID="UpdatePanelToko"><ContentTemplate>
<asp:DropDownList id="ddlToko" runat="server" Width="208px"
OnSelectedIndexChanged="ddlToko_SelectedIndexChanged"
AutoPostBack="True"></asp:DropDownList>  
</ContentTemplate>
</asp:UpdatePanel>
182
</TD><TD style="height: 92px"></TD></TR><TR><TD style="WIDTH:
144px">Alamat:</TD><TD style="WIDTH: 335px"><asp:UpdatePanel
runat="server" ID="UpdatePanelAlamatToko"><ContentTemplate>
<asp:TextBox id="txtAlamatToko" runat="server"
CssClass="inputText" Width="412px" Height="50px"
TextMode="MultiLine" Rows="2" Enabled="False"></asp:TextBox> LT:
<asp:TextBox id="lt" runat="server" CssClass="inputText"
Width="32px" Enabled="False"></asp:TextBox>Blok: <asp:TextBox
id="blok" runat="server" CssClass="inputText" Width="32px"
Enabled="False"></asp:TextBox> No: <asp:TextBox id="no"
runat="server" CssClass="inputText" Width="45px"
Enabled="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD></TD></TR><TR><TD style="WIDTH: 144px">Nama Pemilik
Toko/Dealer:</TD><TD style="WIDTH: 335px"><asp:UpdatePanel
runat="server" ID="UpdatePanelNamaPemilikToko"><ContentTemplate>
<asp:TextBox id="txtNamaOwner" runat="server" CssClass="inputText"
Enabled="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD></TD></TR><TR><TD style="WIDTH: 144px">Nomor HP Pemilik
Toko:</TD><TD style="WIDTH: 335px"><asp:UpdatePanel runat="server"
ID="UpdatePanelHPPemilikToko"><ContentTemplate>
<asp:TextBox id="txtNoHPOwner" runat="server" CssClass="inputText"
Enabled="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD></TD></TR><TR><TD></TD><TD><asp:UpdatePanel
runat="server" ID="UpdatePanelButton"><ContentTemplate>
<asp:Button id="btnSave" onclick="btnSave_Click" runat="server"
Width="100px" Text="Update"></asp:Button> <asp:Button
id="btnCancel" onclick="btnCancel_Click" runat="server"
Width="100px" Text="Cancel"></asp:Button>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR></TBODY></TABLE></FIELDSET> </form>
</dx:PanelContent>
</panelcollection>
<noheadertopedge backcolor="#EBF2F4">
</noheadertopedge>
<Content>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpContentBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</Content>
</dx:ASPxRoundPanel></dt><dd
id="cntrdisp"></dd></dl>
<hr>
</div>
</div>
</div>
</asp:Content>
EditForm.aspx.cs
183
using
using
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
CJM.Database.Oracle;
System.Data.OracleClient;
CJM.Reference;
CJM.Project.LGE;
public partial class AppModules_EditForm : System.Web.UI.Page
{
string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =xronosit))); User
Id=buzapps; password=qwerty007;";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string idmenu = "4";
string iduser = Session["SESS_USER_ID"].ToString();
string batasan = RefDB.editVal(iduser, idmenu);
string IDs = Convert.ToString(Request["KeyValue"]);
string delete =
Convert.ToString(Request["KeyDelete"]);
string[] arInfo = new string[4];
// define which character is seperating fields
char[] splitter = { '.' };
if (batasan == "Y")
{
if ((IDs != null) && (delete == null))
{
try
{
arInfo = IDs.Split(splitter);
string ID = "";
ID = arInfo[0];
OracleConnection conn = new
OracleConnection();
conn.ConnectionString = oradb;
try
{
184
conn.Open();
OracleCommand cmd = new
OracleCommand("SELECT * FROM V_INFO_FRONTLINER WHERE ID = '" + ID
+ "'", conn);
OracleDataReader dr =
cmd.ExecuteReader();
if (dr.HasRows == false)
{
throw new Exception();
}
if (dr.Read())
{
try
{
noHP.Text =
dr["MOBILE_NO"].ToString();
namaLengkap.Text =
dr["EMP_NAME"].ToString();
ddlJenisKelamin.Text =
dr["SEX"].ToString();
txtTglLahir.Text =
dr["DATE_BIRTH"].ToString().Substring(0, 10);
txtAlamatOwner.Text =
dr["ADDRESS"].ToString();
// insert propinsi manual
sdsPropinsi.SelectCommand =
"SELECT ID, PROV_NAME FROM GNRL_REF_PROVINCE ORDER BY PROV_NAME
ASC";
ddlPropinsi.DataSource =
sdsPropinsi;
ddlPropinsi.DataTextField =
"PROV_NAME";
ddlPropinsi.DataValueField =
"ID";
ddlPropinsi.DataBind();
ddlPropinsi.Text =
dr["PROV_ID"].ToString();
//// insert KOTA manual
//sdsKota.SelectCommand =
"SELECT ID, CITY_NAME FROM GNRL_REF_CITY WHERE PROV_ID = '" +
ddlPropinsi.SelectedValue + "' ORDER BY CITY_NAME ";
//ddlKota.Items.Clear();
//ddlKota.DataSource =
sdsKota;
//ddlKota.DataTextField =
"CITY_NAME";
//ddlKota.DataValueField =
"ID";
//ddlKota.DataBind();
//// insert MALL manual
185
//sdsMall.SelectCommand =
"SELECT ID, MALL_NAME FROM GNRL_REF_MALL WHERE CITY_ID = '" +
ddlKota.SelectedValue + "' ORDER BY MALL_NAME ";
//ddlMall.Items.Clear();
//ddlMall.DataSource =
sdsMall;
//ddlMall.DataTextField =
"MALL_NAME";
//ddlMall.DataValueField =
"ID";
//ddlMall.DataBind();
txtNamaOwner.Text =
dr["EMP_OWNER"].ToString();
txtNoHPOwner.Text =
dr["MOBILE_OWNER"].ToString();
dr.Dispose();
cmd.Dispose();
}
catch (Exception)
{
}
}
}
catch (Exception) { }
finally
{
conn.Dispose();
}
}
catch (Exception)
{
//Alert.Show("Anda Tidak berhak mengakses
halaman ini");
Response.Redirect("RegistrasiFrontliner.aspx");
}
}
if ((IDs == null) && (delete != null))
{
string QUERYDELETE = "DELETE EMP_STORE WHERE
ID = '" + delete + "' AND ID_POSITION = 9";
bool SUKSESDELETE =
ConnOracle.ExecNonQueryConnOra(QUERYDELETE);
if ((delete != "") && (SUKSESDELETE))
{
ScriptManager.RegisterClientScriptBlock(this, typeof(Page),
"MessagePopUp", "alert('Delete Frontliner Success');
window.location.href = 'RegistrasiFrontliner.aspx';", true);
186
//ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Delete Owner Success'); window.location.href =
'RegistrasiOwner.aspx';", true);
}
else
{
ScriptManager.RegisterClientScriptBlock(this, typeof(Page),
"MessagePopUp", "alert('Delete Frontliner Failed');
window.location.href = 'RegistrasiFrontliner.aspx';", true);
//ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Delete Owner Failed'); window.location.href =
'RegistrasiOwner.aspx';", true);
}
}
}
else
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "MessagePopUp", "alert('Maaf pada halaman ini anda
tidak memiliki akses Update'); window.location.href =
'RegistrasiFrontliner.aspx';", true);
//ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "alert('Maaf pada halaman ini anda tidak memiliki
akses Update'); window.location.href = 'RegistrasiOwner.aspx';",
true);
//Alert.Show("Maaf pada halaman ini anda tidak
memiliki akses Update");
}
}
}
protected void cmdNoHP_Click(object sender, EventArgs e)
{
}
protected void ddlPropinsi_SelectedIndexChanged(object sender,
EventArgs e)
{
if (ddlPropinsi.SelectedValue == "--PILIH--")
{
// insert kota manual
ddlKota.Items.Clear();
ddlKota.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
// insert mall manual
ddlMall.Items.Clear();
ddlMall.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
187
// insert toko manual
ddlToko.Items.Clear();
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
}
else
{
sdsKota.SelectCommand = "SELECT ID, CITY_NAME FROM
GNRL_REF_CITY WHERE PROV_ID = '" + ddlPropinsi.SelectedValue + "'
ORDER BY CITY_NAME ";
// insert kota manual
ddlKota.Items.Clear();
ddlKota.DataSource = sdsKota;
ddlKota.DataTextField = "CITY_NAME";
ddlKota.DataValueField = "ID";
ddlKota.DataBind();
ddlKota.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
// insert mall manual
ddlMall.Items.Clear();
ddlMall.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
// insert toko manual
ddlToko.Items.Clear();
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
txtAlamatToko.Text = "";
lt.Text = "";
blok.Text = "";
no.Text = "";
txtNamaOwner.Text = "";
txtNoHPOwner.Text = "";
}
}
protected void ddlKota_SelectedIndexChanged(object sender,
EventArgs e)
{
if (ddlKota.SelectedValue == "--PILIH--")
{
ddlMall.Items.Clear();
ddlMall.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
ddlToko.Items.Clear();
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
}
else
{
sdsMall.SelectCommand = "SELECT ID, MALL_NAME FROM
GNRL_REF_MALL WHERE CITY_ID = '" + ddlKota.SelectedValue + "'
ORDER BY MALL_NAME ";
// insert mall manual
ddlMall.Items.Clear();
188
ddlMall.DataSource = sdsMall;
ddlMall.DataTextField = "MALL_NAME";
ddlMall.DataValueField = "ID";
ddlMall.DataBind();
ddlMall.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
}
}
protected void ddlMall_SelectedIndexChanged(object sender,
EventArgs e)
{
if (ddlMall.SelectedValue == "--PILIH--")
{
ddlToko.Items.Clear();
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
}
else
{
sdsToko.SelectCommand = "SELECT ID, STORE_NAME FROM
GNRL_REF_STORE WHERE ID_MALL = '" + ddlMall.SelectedValue + "'
ORDER BY STORE_NAME ";
// insert mall manual
ddlToko.Items.Clear();
ddlToko.DataSource = sdsToko;
ddlToko.DataTextField = "STORE_NAME";
ddlToko.DataValueField = "ID";
ddlToko.DataBind();
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
}
}
protected void ddlToko_SelectedIndexChanged(object sender,
EventArgs e)
{
//Ini untuk koneksi hosting
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST
= (ADDRESS = (PROTOCOL = TCP)(HOST = blitz.co.id)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =buzdev))); User Id=buzapps;
password=qwerty007;";
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST
= (ADDRESS = (PROTOCOL = TCP)(HOST = buzdomain.com)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =blitz.buzdomain.com))); User
Id=buzapps; password=qwerty007;";
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
OracleCommand cmd = new OracleCommand("SELECT
A.MOBILE_NO AS MOBILE_NO, A.EMP_NAME AS EMP_NAME, B.FLOOR AS
FLOOR, B.BLOCK_STORE AS BLOCK_STORE, " +
189
" B.ADDRESS AS
ADDRESS FROM EMP_STORE A, GNRL_REF_STORE B WHERE B.ID_EMP = A.ID
AND B.ID = '" + ddlToko.SelectedItem.Value + "'", conn);
OracleDataReader dr = cmd.ExecuteReader();
if (dr.HasRows == false)
{
throw new Exception();
}
if (dr.Read())
{
try
{
txtAlamatToko.Text = dr["ADDRESS"].ToString();
lt.Text = dr["FLOOR"].ToString();
blok.Text = dr["BLOCK_STORE"].ToString();
txtNamaOwner.Text = dr["EMP_NAME"].ToString();
txtNoHPOwner.Text =
dr["MOBILE_NO"].ToString();
dr.Dispose();
cmd.Dispose();
}
catch (Exception)
{
}
}
}
catch (Exception) { }
finally
{
conn.Dispose();
}
}
protected void btnCancel_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(UpdatePanel1,
this.GetType(), "redirectMe",
"location.href='RegistrasiFrontliner.aspx';", true);
}
protected void btnSave_Click(object sender, EventArgs e)
{
string inNoHP = noHP.Text.Trim();
int jumlah;
string myQuery = "SELECT COUNT(MOBILE_NO) FROM EMP_STORE
WHERE MOBILE_NO = '" + inNoHP + "' AND ID_POSITION = 9";
jumlah =
int.Parse(ConnOracle.ExecQueryScalarConnOra(myQuery).ToString());
if (namaLengkap.Text.Length == 0 ||
namaLengkap.Text.Length < 3)
{
190
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('Nama
Lengkap tidak boleh kosong.')\", 0);", true);
namaLengkap.Focus();
}
else if (noHP.Text.Length == 0)
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('No HP
tidak boleh kosong.')\", 0);", true);
noHP.Focus();
}
else if (noHP.Text.Length < 5)
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('No HP
kurang dari lima digit.')\", 0);", true);
noHP.Focus();
}
else if (!CheckIfNumberic(noHP.Text.Trim()))
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('No HP
harus angka.')\", 0);", true);
noHP.Focus();
}
else if(jumlah > 0)
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('No HP
sudah ada. Anda sudah pernah registrasi!!!')\", 0);", true);
noHP.Focus();
}
else if (ddlJenisKelamin.SelectedValue == "--PILIH--")
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('Jenis
Kelamin harus dipilih.')\", 0);", true);
ddlJenisKelamin.Focus();
}
else if (ddlPropinsi.SelectedValue == "--PILIH--")
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Propinsi harus dipilih.')\", 0);",
true);
ddlPropinsi.Focus();
}
else if (ddlKota.SelectedValue == "--PILIH--")
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('Kota
harus dipilih.')\", 0);", true);
ddlKota.Focus();
}
else if (ddlMall.SelectedValue == "--PILIH--")
191
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('Mall
harus dipilih.')\", 0);", true);
ddlMall.Focus();
}
else if (ddlToko.SelectedValue == "--PILIH--")
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('Toko
harus dipilih.')\", 0);", true);
ddlToko.Focus();
}
else
{
//INFORMASI KARYAWAN TOKO
string fNamaKaryawan = namaLengkap.Text.Replace("'",
"\''");
//Nama Lengkap Karyawan
string fJenkel = ddlJenisKelamin.SelectedItem.Value;
//Jenis Kelamin Karyawan
string fTglLahir = ForNET.DateToDB(txtTglLahir.Text);
//Tanggal Lahir Karyawan
string fNoHP = noHP.Text.Trim();
//NO HP Karyawan
string fAlamat = txtAlamatOwner.Text;
//Alamat Karyawan
//INFORMASI TOKO DAN PEMILIK TOKO
string tNamaPropinsi = ddlPropinsi.SelectedItem.Value;
//Nama Propinsi
string tNamaKota = ddlKota.SelectedItem.Value;
//Nama Kota
string tIDToko = ddlToko.SelectedItem.Value;
//ID TOKO buat Karyawan
string IDs = Convert.ToString(Request["KeyValue"]);
string[] arInfo = new string[4];
// define which character is seperating fields
char[] splitter = { '.' };
arInfo = IDs.Split(splitter);
string ID = "";
ID = arInfo[0];
string queryIDParent = "SELECT A.ID FROM EMP_STORE A,
GNRL_REF_STORE B " +
"WHERE B.ID_EMP = A.ID AND B.ID
= '" + ddlToko.SelectedItem.Value + "'";
string tIDParent =
ConnOracle.ExecQueryScalarConnOra(queryIDParent).ToString();
string queryKaryawan = "UPDATE EMP_STORE SET" +
" EMP_NAME = UPPER('" + fNamaKaryawan
+ "'), SEX = '" + fJenkel + "', DATE_BIRTH = " +
192
fTglLahir + ", MOBILE_NO = '" + fNoHP
+ "', ADDRESS = '" + fAlamat + "', PROV_ID = '" +
tNamaPropinsi + "', CITY_ID = '" +
tNamaKota + "', ID_PARENT = '" + tIDParent + "' " +
"WHERE ID = '" + ID + "'";
bool suksesUpdateKaryawan =
ConnOracle.ExecNonQueryConnOra(queryKaryawan);
string queryKaryawanToToko = "UPDATE EMP_TO_STORE SET
" +
" STORE_ID = '" + tIDToko + "', ID_EMP
= '" + tIDParent + "' " +
" WHERE EMP_ID_FRNL = '" + ID + "'";
bool suksesUpdateKaryawanToToko =
ConnOracle.ExecNonQueryConnOra(queryKaryawanToToko);
if (suksesUpdateKaryawan)
{
//if (suksesUpdateKaryawanToToko)
//{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Update Success.')\", 0);", true);
ScriptManager.RegisterStartupScript(UpdatePanel1, this.GetType(),
"redirectMe", "location.href='RegistrasiFrontliner.aspx';", true);
//}
//else
//{
//
ScriptManager.RegisterClientScriptBlock(this, typeof(Page),
"validationAlert", "window.setTimeout(\"alert('Insert Failed To
Store.')\", 0);", true);
//}
}
else
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Update Failed EMP Store.')\", 0);",
true);
}
}
}
bool CheckIfNumberic(string myNumber)
{
bool IsNum = true;
for (int index = 0; index < myNumber.Length; index++)
{
if (!Char.IsNumber(myNumber[index]))
{
IsNum = false;
193
break;
}
}
return IsNum;
}
}
EditImeiWarrant.aspx
<%--<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="RegistrasiOwner.aspx.cs" Inherits="AppModules_Default2"
%>
--%>
<%@ Page Language="C#" MasterPageFile="MasterPage.master"
AutoEventWireup="true" CodeFile="EditImeiWarrant.aspx.cs"
Inherits="AppModules_Default2" Title="Sales Management System"
EnableEventValidation ="false" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxUploadControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
<div style="text-align: left">
<asp:Label ID="CaptionUtama" runat="server"
Width="450px" BackColor="White" Font-Size="Large"
ForeColor="SteelBlue" Visible="False"></asp:Label>
<dx:ASPxRoundPanel ID="ASPxRoundPanel2" runat="server"
BackColor="#EBF2F4"
CssFilePath="~/App_Themes/Glass/{0}/styles.css"
CssPostfix="Glass" HeaderText="Warrant Card
Collection" SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css"
Width="200px">
<LeftEdge>
194
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</LeftEdge>
<HeaderContent>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</HeaderContent>
<ContentPaddings PaddingBottom="10px"
PaddingLeft="4px" PaddingTop="10px" />
<RightEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</RightEdge>
<HeaderRightEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderRightEdge.gif"
VerticalPosition="bottom" />
</HeaderRightEdge>
<Border BorderColor="#7EACB1" BorderStyle="Solid"
BorderWidth="1px" />
<HeaderStyle BackColor="White" Height="23px">
<BorderBottom BorderStyle="None" />
<Paddings PaddingBottom="0px" PaddingLeft="2px"
PaddingTop="0px" />
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderLeftEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</HeaderLeftEdge>
<BottomEdge BackColor="#D7E9F1">
</BottomEdge>
<PanelCollection>
<dx:PanelContent runat="server">
<asp:ScriptManager id="ScriptManager1"
runat="server">
</asp:ScriptManager><table width="900">
<tr>
<td style="width: 470px; height: 18px"
valign="top">
<asp:UpdatePanel
id="UpdatePanel19" runat="server">
<contenttemplate>
<dx:ASPxRoundPanel id="ASPxRoundPanel4" runat="server"
Width="400px" HeaderText="Input with Schedule"
CssPostfix="Office2003Olive"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
BackColor="#E2E8C9" EnableDefaultAppearance="False"
__designer:wfdid="w128">
<TopEdge>
195
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Olive/Web/rpTopEdge.png"></Backgr
oundImage>
</TopEdge>
<HeaderContent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Olive/Web/rpHeader.png"></Backgro
undImage>
</HeaderContent>
<ContentPaddings PaddingTop="10px" Padding="2px"
PaddingBottom="10px"></ContentPaddings>
<HeaderRightEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Olive/Web/rpHeader.png"></Backgro
undImage>
</HeaderRightEdge>
<Border BorderWidth="1px" BorderStyle="Solid"
BorderColor="#758D5E"></Border>
<HeaderStyle BackColor="#B5C48F">
<Paddings Padding="0px" PaddingRight="2px" PaddingBottom="7px"
PaddingLeft="2px"></Paddings>
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#758D5E"></BorderBottom>
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Olive/Web/rpHeader.png"></Backgro
undImage>
</HeaderLeftEdge>
<DisabledStyle ForeColor="Gray"></DisabledStyle>
<PanelCollection>
<dx:PanelContent runat="server"><TABLE width="100%"><TBODY><TR><TD
style="WIDTH: 168px" vAlign=top><asp:Label runat="server"
Width="163px" ID="Caption1"
__designer:wfdid="w182">Schedule</asp:Label>
</TD><TD style="WIDTH: 3px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel1"
__designer:wfdid="w183"><ContentTemplate>
<asp:DropDownList id="visit_date" runat="server"
__designer:wfdid="w184"
OnSelectedIndexChanged="visit_date_SelectedIndexChanged1"
AutoPostBack="True"
AppendDataBoundItems="True"></asp:DropDownList> 
</ContentTemplate>
</asp:UpdatePanel>
196
<asp:UpdateProgress runat="server" ID="UpdateProgress1"
AssociatedUpdatePanelID="UpdatePanel1"
__designer:wfdid="w186"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress1" runat="server"
Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w187"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR><TD style="WIDTH: 168px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption2"
__designer:wfdid="w188">Store</asp:Label>
</TD><TD style="WIDTH: 3px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel11"
__designer:wfdid="w189"><ContentTemplate>
<asp:DropDownList id="toko_kunjungan" runat="server"
__designer:wfdid="w190"
OnSelectedIndexChanged="toko_kunjungan_SelectedIndexChanged1"
AutoPostBack="True"
AppendDataBoundItems="True"></asp:DropDownList> 
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress122"
AssociatedUpdatePanelID="UpdatePanel11"
__designer:wfdid="w192"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress122"
runat="server" Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w193"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR><TD style="WIDTH: 168px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption3"
__designer:wfdid="w194">Mobile Promotor</asp:Label>
</TD><TD style="WIDTH: 3px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel2"
__designer:wfdid="w195"><ContentTemplate>
<asp:DropDownList id="Prom_id" runat="server"
__designer:wfdid="w196"
AppendDataBoundItems="True"></asp:DropDownList>  
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 168px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption4"
__designer:wfdid="w198">Authorize</asp:Label>
</TD><TD style="WIDTH: 3px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel3"
__designer:wfdid="w199"><ContentTemplate>
<dx:ASPxTextBox id="aut_id" runat="server" Width="170px"
Visible="False"
__designer:wfdid="w200"></dx:ASPxTextBox><dx:ASPxTextBox
id="aut_id2" runat="server" Width="170px"
__designer:wfdid="w201"></dx:ASPxTextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR></TBODY></TABLE></dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="#E2E8C9"></NoHeaderTopEdge>
197
</dx:ASPxRoundPanel>
</contenttemplate>
</asp:UpdatePanel></td>
<td style="height: 18px" valign="top">
</td>
<td rowspan="1" valign="top">
<asp:UpdatePanel
id="UpdatePanel9" runat="server">
<contenttemplate>
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
Width="100%" HeaderText="Detail Input" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
BackColor="White" __designer:wfdid="w199">
<TopEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif"></BackgroundImage>
</TopEdge>
<LeftEdge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif"></BackgroundImage>
</LeftEdge>
<HeaderContent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderContent>
<ContentPaddings Padding="14px"></ContentPaddings>
<RightEdge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif"></BackgroundImage
>
</RightEdge>
<HeaderRightEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderRightEdge>
<Border BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></Border>
<HeaderStyle BackColor="#E0EDFF">
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></BorderBottom>
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderLeftEdge>
<BottomEdge>
198
<BackgroundImage Repeat="RepeatX" VerticalPosition="Bottom"
ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif"></BackgroundImag
e>
</BottomEdge>
<PanelCollection>
<dx:PanelContent runat="server"><TABLE width="100%"><TBODY><TR><TD
style="WIDTH: 220px" vAlign=top><asp:Label runat="server"
Width="163px" ID="Caption5"
__designer:wfdid="w204">Frontliner</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel4"
__designer:wfdid="w205"><ContentTemplate>
<asp:DropDownList id="front_id" runat="server"
__designer:wfdid="w206"
AppendDataBoundItems="True"></asp:DropDownList> 
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption8"
__designer:wfdid="w208">Product No.</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel5"
__designer:wfdid="w209"><ContentTemplate>
<dx:ASPxTextBox id="imei" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
BackColor="PaleTurquoise" __designer:wfdid="w210"
AutoPostBack="True" OnTextChanged="imei_TextChanged">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox> <dx:ASPxTextBox id="prod_id" runat="server"
Width="170px" __designer:wfdid="w212"></dx:ASPxTextBox>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress235"
AssociatedUpdatePanelID="UpdatePanel5"
__designer:wfdid="w213"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress235"
runat="server" Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w214"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:Label runat="server" Font-Size="Medium" Font-Bold="True"
Width="211px" ForeColor="Green" ID="Label5"
__designer:wfdid="w215"></asp:Label>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption9"
__designer:wfdid="w216">Customer Name</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel7"
__designer:wfdid="w217"><ContentTemplate>
<dx:ASPxTextBox id="cust_name" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w218">
199
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox> 
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption10"
__designer:wfdid="w220">Phone</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel8"
__designer:wfdid="w221"><ContentTemplate>
<dx:ASPxTextBox id="cust_phone" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w222">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox> 
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Label4"
__designer:wfdid="w224">Email</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel13"
__designer:wfdid="w225"><ContentTemplate>
<dx:ASPxTextBox id="email" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w226">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR></TBODY></TABLE></dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="White">
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif"></Backgroun
dImage>
</NoHeaderTopEdge>
</dx:ASPxRoundPanel>
</contenttemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td valign="top" colspan="3">
200
<asp:UpdatePanel
id="UpdatePanel14" runat="server">
<contenttemplate>
   <TABLE style="WIDTH:
139px"><TBODY><TR><TD> <dx:ASPxButton id="ASPxButton1"
runat="server" Width="80px" __designer:wfdid="w245" Text="Update"
OnClick="ASPxButton1_Click"></dx:ASPxButton></TD><TD
colSpan=2> <dx:ASPxButton id="ASPxButton2" runat="server"
Width="80px" CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
__designer:wfdid="w246" Text="Cancel" CausesValidation="False"
OnClick="ASPxButton2_Click"></dx:ASPxButton></TD></TR></TBODY></TA
BLE>
</contenttemplate>
</asp:UpdatePanel>
<asp:SqlDataSource ID="table_prom" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_auth" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_front" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_prod" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_grid" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_toko" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_prod_type"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand='SELECT "ID", "GROUP_NAME",
"COMP_ID" FROM "REF_PRODUCT_GROUP" ORDER BY
"GROUP_NAME"'>
</asp:SqlDataSource>
<asp:SqlDataSource ID="table_gridUtama"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand='SELECT "ID", "FL_ID",
"SALES_ID", "PRODUCT_ID",
"PRODUCT_NO", "COLLECT_DATE",
"COMP_ID", "SALES_AUTHORIZE" FROM
201
"DAILY_COLLECT_KG" ORDER BY "INPUT_DATE"
DESC'>
</asp:SqlDataSource>
<asp:SqlDataSource ID="table_sched" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" >
</asp:SqlDataSource>
<asp:SqlDataSource ID="tb_store" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" >
</asp:SqlDataSource>
<asp:SqlDataSource ID="tb_mp" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" >
</asp:SqlDataSource>
<asp:SqlDataSource ID="tb_auth" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" >
</asp:SqlDataSource>
<asp:SqlDataSource ID="tb_mall" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" >
</asp:SqlDataSource>
</td>
</tr>
</table>
</dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="#EBF2F4">
</NoHeaderTopEdge>
<Content>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpContentBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</Content>
</dx:ASPxRoundPanel>
<!-- ======================== TABLE UTAMA
=========================== -->
<!-- ======================== BATAS AKHIR TABLE UTAMA
=========================== -->
</div>
</form>
</asp:Content>
EditImeiWarrant.aspx.cs
202
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//using DevExpress.Web.ASPxEditors;
using CJM.Database.Oracle;
using System.Data.OracleClient;
using CJM.Reference;
using CJM.Project.LGE;
using DevExpress.Web.ASPxEditors;
public partial class AppModules_Default2 : System.Web.UI.Page
{
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = buzdomain.com)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =blitz.buzdomain.com))); User
Id=buzapps; password=qwerty007;";
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = blitz.co.id)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =buzdev))); User Id=buzapps;
password=qwerty007;";
string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =xronosit))); User
Id=buzapps; password=qwerty007;";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string idmenu = "17";
string iduser = Session["SESS_USER_ID"].ToString();
string batasan = RefDB.editVal(iduser, idmenu);
string edit = Convert.ToString(Request["id_edit"]);
string delete =
Convert.ToString(Request["id_delete"]);
if (Session["SESS_USER_ID"] == null)
{
Response.Redirect("../LogOut.aspx");
}
//============================= cek caption
=================
if (Session["SESS_LANG"] == "english")
{
Caption1.Text = "Schedule";
203
Caption2.Text = "Store";
Caption3.Text = "Mobile Promotor";
Caption4.Text = "Authorize";
Caption5.Text = "Frontliner";
//Caption6.Text = "Product Type";
//Caption7.Text = "Product Model";
Caption8.Text = "Product No.";
Caption9.Text = "Customer Name";
Caption10.Text = "Phone";
//Caption12.Text = "Owner Information";
//Caption13.Text = "Name";
//Caption14.Text = "Address";
//Caption15.Text = "Mobile No.";
CaptionUtama.Text = "Warrant Card Collecting";
}
if (Session["SESS_LANG"] == "indonesia")
{
Caption1.Text = "Jadwal";
Caption2.Text = "Toko";
Caption3.Text = "Mobile Promotor";
Caption4.Text = "Perwakilan";
Caption5.Text = "Frontliner";
//Caption6.Text = "Tipe Produk";
//Caption7.Text = "Model";
Caption8.Text = "No. Produk";
Caption9.Text = "Nama Customer";
Caption10.Text = "Telephon";
//Caption12.Text = "Informasi Pemilik";
//Caption13.Text = "Nama";
//Caption14.Text = "Alamat";
//Caption15.Text = "No. HP";
CaptionUtama.Text = "Penarikan Kartu Garansi";
}
if (batasan == "Y")
{
if ((edit != null)&&(delete == null))
{
OracleConnection conn = new
OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
string query = "SELECT " +
"a.ID, a.FL_ID, a.SALES_ID
as MP_ID, " +
"a.PRODUCT_ID,
a.PRODUCT_NO, a.COLLECT_DATE, " +
"a.SALES_AUTHORIZE as
SALES_ID, " +
"a.REMARKS,
a.CUSTOMER_NAME, a.EMAIL, " +
"a.NOTELP_CUSTOMER,
a.STORE_ID, b.STORE_NAME" +
204
" FROM DAILY_COLLECT_KG a,
GNRL_REF_STORE b
" +
"Where " +
"a.ID = '" + edit + "' AND
a.STORE_ID = b.ID";
OracleCommand cmd = new OracleCommand(query,
conn);
OracleDataReader ds = cmd.ExecuteReader();
if (ds.HasRows == false)
{
throw new Exception();
}
if (ds.Read())
{
string dates =
ForNET.DateFromDB(ds["COLLECT_DATE"].ToString());
//Svisit_date.Text =
ForNET.DateFromDB(ds["COLLECT_DATE"].ToString());
table_sched.SelectCommand = "SELECT
DISTINCT TO_CHAR(DATE_SCHED, 'DD/MM/YYYY') as Date_sch " +
"FROM
EMP_SALES_SCHED " +
"ORDER BY 1 DESC";
visit_date.DataSource = table_sched;
visit_date.DataTextField = "Date_sch";
visit_date.DataValueField = "Date_sch";
visit_date.DataBind();
visit_date.Items.Insert(0, new
ListItem(dates, dates));
Prom_id.SelectedValue =
ds["MP_ID"].ToString();
aut_id.Text = ds["SALES_ID"].ToString();
front_id.SelectedValue =
ds["FL_ID"].ToString();
imei.Text = ds["PRODUCT_NO"].ToString();
prod_id.Text =
ds["PRODUCT_ID"].ToString();
cust_name.Text =
ds["CUSTOMER_NAME"].ToString();
cust_phone.Text =
ds["NOTELP_CUSTOMER"].ToString();
email.Text = ds["EMAIL"].ToString();
string storeid =
ds["STORE_ID"].ToString();
string storename =
ds["STORE_NAME"].ToString();
string dateForStore =
ForNET.DateToDB(dates.ToString());
205
//===================== sales toko
kunjungan
table_toko.SelectCommand = "SELECT
DISTINCT a.STORE_ID, b.STORE_NAME FROM " +
"EMP_SALES_SCHED a, GNRL_REF_STORE b " +
"WHERE
a.DATE_SCHED = " + dateForStore + " AND a.STORE_ID = b.ID " +
"ORDER BY b.STORE_NAME ASC";
toko_kunjungan.DataSource = table_toko;
toko_kunjungan.DataTextField =
"STORE_NAME";
toko_kunjungan.DataValueField =
"STORE_ID";
toko_kunjungan.DataBind();
toko_kunjungan.Items.Insert(0, new
ListItem(storename, storeid));
}
}
catch (Exception)
{
}
finally
{
conn.Dispose();
}
}
if ((edit == null) && (delete != null))
{
string QUERYDELETE = "DELETE GNRL_REF_STORE WHERE
ID = '" + delete + "'";
bool SUKSESDELETE =
ConnOracle.ExecNonQueryConnOra(QUERYDELETE);
if ((delete != "") && (SUKSESDELETE))
{
ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Delete Success'); window.location.href =
'ImeiWarrant.aspx';", true);
}
else
{
ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Delete Failed'); window.location.href =
'ImeiWarrant.aspx';", true);
}
}
}
206
else
{
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "alert('Maaf pada halaman ini anda tidak memiliki
akses Update'); window.location.href = 'ImeiWarrant.aspx';",
true);
//Alert.Show("Maaf pada halaman ini anda tidak
memiliki akses Update");
}
}
}
//================ With Schedule
============================//
protected void imei_TextChanged(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string IMEINO = imei.Text;
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
string queryss = "SELECT COUNT(*) AS IMEI FROM
INVENT_PRODNO WHERE PROD_NO = '" + IMEINO + "'";
OracleCommand cmds = new OracleCommand(queryss, conn);
OracleDataReader drs = cmds.ExecuteReader();
if (drs.HasRows == false)
{
throw new Exception();
}
if (drs.Read())
{
try
{
string noid = drs["IMEI"].ToString();
if (noid == "0")
{
Label5.Text = "Your Imei Invalid";
imei.Text = "";
}
else
{
Label5.Text = "Your Imei Valid";
207
string querysxs = "SELECT
DISTINCT class PRODUCT "+
",CASE
"+
"WHEN
UPPER (o.model) LIKE 'M10V%' "+
"OR
UPPER (o.model) LIKE '%1012%' "+
"THEN
'MINI' "+
"WHEN
o.model LIKE 'I%' OR model LIKE 'IN%' "+
"THEN 'INSPIRON' "+
"WHEN
o.model LIKE 'X%' "+
"THEN 'XPS' "+
"WHEN
o.model LIKE 'S%' "+
"THEN 'STUDIO' "+
"WHEN
o.model LIKE 'W%' "+
"THEN 'ALIEN WARE' "+
"WHEN
o.model LIKE 'V%' "+
"THEN 'VOSTRO' "+
"WHEN
o.model LIKE 'A%' "+
"THEN 'ADAMO' "+
"ELSE
'N/A' "+
"END
TYPE, MODEL, p.ID "+
"FROM
invent_prodno p "+
",invent_order o "+
"WHERE
p.invent_id = o.id "+
"AND
p.prod_no LIKE '" + IMEINO + "'";
OracleCommand cmdsxs = new
OracleCommand(querysxs, conn);
OracleDataReader drsxs =
cmdsxs.ExecuteReader();
if (drsxs.Read())
{
prod_id.Text =
drsxs["ID"].ToString();
}
208
}
drs.Dispose();
cmds.Dispose();
}
catch (Exception)
{
}
}
}
catch (Exception) { }
finally
{
conn.Dispose();
}
}
protected void toko_kunjungan_SelectedIndexChanged1(object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string visitdates = visit_date.SelectedItem.Text;
string storid =
toko_kunjungan.SelectedItem.Value.ToString();
//===================== Authorize
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
string querysx = "SELECT DISTINCT a.SALES_ID,
b.EMP_NAME FROM " +
"EMP_SALES_SCHED a,
EMP_SALES_OFFICER b " +
"WHERE a.DATE_SCHED =
'" + visitdates + "' AND a.STORE_ID = " + storid + " AND
a.SALES_ID = b.ID " +
"ORDER BY
b.EMP_NAME ASC";
OracleCommand cmdx = new OracleCommand(querysx, conn);
OracleDataReader drx = cmdx.ExecuteReader();
if (drx.HasRows == false)
{
throw new Exception();
}
if (drx.Read())
{
try
{
209
aut_id.Text = drx["SALES_ID"].ToString();
aut_id2.Text = drx["EMP_NAME"].ToString();
drx.Dispose();
cmdx.Dispose();
}
catch (Exception)
{
}
}
}
catch (Exception) { }
finally
{
conn.Dispose();
}
//================ Mobile Promotor
table_prom.SelectCommand = "select distinct w.SALES_ID,
o.EMP_NAME as MP_NAME" +
"from emp_sales_workarea w,
emp_sales_officer o " +
"where w.sales_id = o.id " +
"and w.prov_id in (select
prov_id from gnrl_ref_store where id = " + storid + ") " +
"union all " +
"SELECT DISTINCT a.SALES_ID,
b.EMP_NAME FROM " +
"EMP_SALES_SCHED a,
EMP_SALES_OFFICER b " +
"WHERE a.DATE_SCHED =
'" + visitdates + "' AND a.STORE_ID = " + storid + " AND
a.SALES_ID = b.ID " +
"ORDER BY 1 DESC";
Prom_id.DataSource = table_prom;
Prom_id.DataTextField = "MP_NAME";
Prom_id.DataValueField = "SALES_ID";
Prom_id.DataBind();
Prom_id.Items.Insert(0, new ListItem("-- chose --", "-"));
//================ Frontliner
table_front.SelectCommand = "SELECT id as FL_ID, emp_name
as FL_NAME " +
"FROM emp_store " +
"WHERE id_parent IN (SELECT
id_emp FROM gnrl_ref_store WHERE id = " + storid + " )";
front_id.DataSource = table_front;
front_id.DataTextField = "FL_NAME";
front_id.DataValueField = "FL_ID";
front_id.DataBind();
210
front_id.Items.Insert(0, new ListItem("-- chose --", "
"));
}
protected void visit_date_SelectedIndexChanged1(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string visitdate = visit_date.SelectedItem.Text;
//===================== sales toko kunjungan
table_toko.SelectCommand = "SELECT DISTINCT a.STORE_ID,
b.STORE_NAME FROM " +
"EMP_SALES_SCHED a,
GNRL_REF_STORE b " +
"WHERE a.DATE_SCHED =
'" + visitdate + "' AND a.STORE_ID = b.ID " +
"ORDER BY
b.STORE_NAME ASC";
toko_kunjungan.DataSource = table_toko;
toko_kunjungan.DataTextField = "STORE_NAME";
toko_kunjungan.DataValueField = "STORE_ID";
toko_kunjungan.DataBind();
toko_kunjungan.Items.Insert(0, new ListItem("-- chose --",
" "));
}
protected void ASPxButton1_Click(object sender, EventArgs e)
{
string ovisit_date =
ForNET.DateToDB(visit_date.SelectedValue);
string oProm_id = Prom_id.SelectedValue;
string oaut_id = aut_id.Text;
string ofront_id = front_id.SelectedValue;
string oimei = imei.Text;
string oprod_id = prod_id.Text;
string ocust_name = cust_name.Text;
string ocust_phone = cust_phone.Text;
string oemail = email.Text;
string otoko_kunjungan = toko_kunjungan.SelectedValue;
string editProcess = Convert.ToString(Request["id_edit"]);
string myQueryCity = "UPDATE DAILY_COLLECT_KG SET " +
"FL_ID ='" + ofront_id + "'," +
"SALES_ID ='" + oaut_id + "'," +
"PRODUCT_ID ='" + oprod_id + "'," +
"PRODUCT_NO ='" + oimei + "'," +
"COLLECT_DATE =" + ovisit_date + ","
+
"INPUT_BY = '" +
Session["SESS_USER_ID"] + "'," +
211
"COMP_ID = " +
Session["SESS_COMP_ID"] + "," +
"SALES_AUTHORIZE = '" + oaut_id +
"'," +
"CUSTOMER_NAME = '" + ocust_name +
"'," +
"EMAIL = '" + oemail + "'," +
"NOTELP_CUSTOMER = '" + ocust_phone +
"', " +
"STORE_ID = '" + otoko_kunjungan +
"'" +
"WHERE ID = '" + editProcess + "'";
bool suksesInsertCity =
ConnOracle.ExecNonQueryConnOra(myQueryCity);
if (suksesInsertCity)
{
////visit_date.Text = "";
////Prom_id.SelectedItem.Text = "";
//////aut_id.SelectedItem.Text = "";
//Label5.Text = "";
//front_id.SelectedItem.Text = "";
//imei.Text = "";
//cust_name.Text = "";
//cust_phone.Text = "";
//email.Text = "";
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "MessagePopUp", "alert('Update Success');
window.location.href = 'ImeiWarrant.aspx';", true);
//ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Success.')\", 0);", true);
//Alert.Show("Insert Owner success.");
}
else
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "MessagePopUp", "alert('Update Failed');
window.location.href = 'ImeiWarrant.aspx';", true);
}
}
protected void ASPxButton2_Click(object sender, EventArgs e)
{
Response.Redirect("Default.aspx");
}
}
EditRegistrasiOwner.aspx
<%--<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="RegistrasiOwner.aspx.cs" Inherits="AppModules_Default2"
%>
--%>
212
<%@ Page Language="C#" MasterPageFile="MasterPage.master"
AutoEventWireup="true" CodeFile="EditRegistrasiOwner.aspx.cs"
Inherits="AppModules_Default2" Title="Sales Management System"
EnableEventValidation="false" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
<div style="text-align: left">
<!-- ======================== TABLE UTAMA
=========================== -->
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
BackColor="#EBF2F4"
CssFilePath="~/App_Themes/Glass/{0}/styles.css"
CssPostfix="Glass" HeaderText="Edit Owner
Registration"
SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css"
Width="100%">
<leftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"></Background
Image>
</leftedge>
<headercontent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpHeaderBack.gif"></BackgroundIma
ge>
</headercontent>
<contentpaddings PaddingBottom="10px"
PaddingLeft="4px" PaddingTop="10px"></contentpaddings>
<rightedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"></Background
Image>
</rightedge>
<headerrightedge>
<BackgroundImage VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpHeaderRightEdge.gif"></Backgrou
ndImage>
</headerrightedge>
213
<border bordercolor="#7EACB1" borderstyle="Solid"
borderwidth="1px"></border>
<headerstyle backcolor="White" Height="23px">
<BorderBottom BorderStyle="None"></BorderBottom>
<Paddings PaddingBottom="0px" PaddingLeft="2px"
PaddingTop="0px" />
</headerstyle>
<headerleftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpHeaderLeftEdge.gif"></Backgroun
dImage>
</headerleftedge>
<bottomedge BackColor="#D7E9F1">
</bottomedge>
<panelcollection>
<dx:PanelContent runat="server"><TABLE width="900"><TBODY><TR><TD
style="TEXT-ALIGN: center" colSpan=6><asp:Label runat="server"
Text="Label" Width="368px" ID="CaptionUtama"
Visible="False"></asp:Label>
<asp:ScriptManager runat="server"
ID="ScriptManager1"></asp:ScriptManager>
  </TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption1"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><SPAN style="FONT-SIZE: 10pt; COLOR:
#ff0033"><asp:UpdatePanel runat="server"
ID="UpdatePanel1"><ContentTemplate>
<asp:TextBox id="EMP_NAME" tabIndex=1 runat="server"
CausesValidation="True"></asp:TextBox> <BR /> <asp:TextBox
id="TextBox1" tabIndex=2 runat="server"
Visible="False"></asp:TextBox> 
</ContentTemplate>
</asp:UpdatePanel>
</SPAN></TD><TD style="WIDTH: 129px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption10"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel7"><ContentTemplate>
<asp:TextBox id="ID_NO" tabIndex=11 runat="server"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption2"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><SPAN style="FONT-SIZE: 10pt; COLOR:
#ff0033"><asp:UpdatePanel runat="server"
ID="UpdatePanel2"><ContentTemplate>
<asp:TextBox id="MOBILE_NO" tabIndex=3 runat="server"
BackColor="LightSteelBlue" BorderColor="#E0E0E0"
AutoPostBack="True"
OnTextChanged="MOBILE_NO_TextChanged"></asp:TextBox> <BR />
<asp:Label id="Label1" runat="server" Width="221px"
ForeColor="Green" Font-Size="Medium" Font-Bold="True"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
214
<asp:UpdateProgress runat="server" ID="UpdateProgress1"
AssociatedUpdatePanelID="UpdatePanel2"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress" runat="server"
ImageUrl="~/images/wait.gif"
Width="150px"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</SPAN></TD><TD style="WIDTH: 129px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption11"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel8"><ContentTemplate>
<asp:DropDownList id="ID_TYPE" tabIndex=12 runat="server"
DataSourceID="Table_Gnrl_parameter" DataValueField="ID"
DataTextField="PARAMETER_CODE"
AppendDataBoundItems="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption3"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel3"><ContentTemplate>
<asp:RadioButtonList id="SEX" tabIndex=4
runat="server"><asp:ListItem Selected="True"
Value="L">Male</asp:ListItem>
<asp:ListItem Value="P">Female</asp:ListItem>
</asp:RadioButtonList>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 129px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption12"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel9"><ContentTemplate>
<dx:ASPxDateEdit id="iID_EXPIRED" tabIndex=13 runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
ShowShadow="False" EditFormatString="dd/MM/yyyy">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<CalendarProperties>
<FooterStyle Spacing="17px"></FooterStyle>
<HeaderStyle Spacing="1px"></HeaderStyle>
</CalendarProperties>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
215
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
</dx:ASPxDateEdit> <dx:ASPxTextBox id="sID_EXPIRED" runat="server"
Width="170px" Visible="False"></dx:ASPxTextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption4"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel4"><ContentTemplate>
<asp:TextBox id="NICK_NAME" tabIndex=5
runat="server"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 129px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption13"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel10"><ContentTemplate>
<asp:TextBox id="ADDRESS" tabIndex=14 runat="server"
TextMode="MultiLine"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption5"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel5"><ContentTemplate>
<dx:ASPxDateEdit id="iDATE_BIRTH" tabIndex=6 runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
ShowShadow="False" EditFormatString="dd/MM/yyyy"
EditFormat="Custom">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<CalendarProperties>
<FooterStyle Spacing="17px"></FooterStyle>
<HeaderStyle Spacing="1px"></HeaderStyle>
</CalendarProperties>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
216
</dx:ASPxDateEdit> <dx:ASPxTextBox id="sDATE_BIRTH" runat="server"
Width="170px" Visible="False"></dx:ASPxTextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 129px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption14"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel11"><ContentTemplate>
<asp:DropDownList id="PROV_ID" tabIndex=15 runat="server"
DataSourceID="Table_Prov" AutoPostBack="True" DataValueField="ID"
DataTextField="PROV_NAME" AppendDataBoundItems="True"
OnSelectedIndexChanged="PROV_ID_SelectedIndexChanged"><asp:ListIte
m Selected="True" Value="0">-- Chose --</asp:ListItem>
</asp:DropDownList><BR /> 
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress2"
AssociatedUpdatePanelID="UpdatePanel11"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress2" runat="server"
ImageUrl="~/images/wait.gif"
Width="150px"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption6"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel6"><ContentTemplate>
<asp:TextBox id="PLACE_BIRTH" tabIndex=7
runat="server"></asp:TextBox><BR /> 
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 129px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption15"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel12"><ContentTemplate>
<asp:DropDownList id="CITY_ID" tabIndex=16 runat="server"
DataSourceID="Table_City" AppendDataBoundItems="True"
DataTextField="CITY_NAME"
DataValueField="ID"></asp:DropDownList> <BR />
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption7"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel16"><ContentTemplate>
<asp:DropDownList id="MANAGEPARTNER" tabIndex=8 runat="server"
AppendDataBoundItems="True"><asp:ListItem Selected="True"
Value="N">-- chose --</asp:ListItem>
<asp:ListItem Value="Y">yes</asp:ListItem>
<asp:ListItem Value="N">No</asp:ListItem>
</asp:DropDownList> 
</ContentTemplate>
217
</asp:UpdatePanel>
</TD><TD style="WIDTH: 129px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption16"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel13"><ContentTemplate>
<dx:ASPxDateEdit id="iREGISTER_DATE" tabIndex=17 runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
ShowShadow="False" EditFormatString="dd/MM/yyyy">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<CalendarProperties>
<FooterStyle Spacing="17px"></FooterStyle>
<HeaderStyle Spacing="1px"></HeaderStyle>
</CalendarProperties>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
</dx:ASPxDateEdit> <dx:ASPxTextBox id="sREGISTER_DATE"
runat="server" Width="170px" Visible="False"></dx:ASPxTextBox><BR
/> 
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR>
<tr>
<td style="width: 166px; height: 21px" valign="top">
</td>
<td style="width: 11px; height: 21px" valign="top">
</td>
<td style="width: 289px; height: 21px" valign="top">
</td>
<td style="width: 129px; height: 21px" valign="top">
</td>
<td style="width: 6px; height: 21px" valign="top">
</td>
<td style="width: 671px; height: 21px" valign="top">
</td>
</tr>
<tr>
<td align="right" style="width: 166px" valign="top">
<dx:ASPxButton ID="ASPxButton1" runat="server"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
CssPostfix="Office2003Silver"
OnClick="ASPxButton1_Click"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
Text="Update" Width="100px">
</dx:ASPxButton>
218
</td>
<td style="width: 11px" valign="top">
</td>
<td style="width: 289px" valign="top">
<dx:ASPxButton ID="ASPxButton2" runat="server"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
CssPostfix="Office2003Silver"
OnClick="ASPxButton2_Click"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
Text="Cancel" Width="100px">
</dx:ASPxButton>
</td>
<td style="width: 129px" valign="top">
</td>
<td style="width: 6px" valign="top">
</td>
<td style="width: 671px" valign="top">
<asp:SqlDataSource runat="server" ID="Table_Prov"
SelectCommand="SELECT * FROM "GNRL_REF_PROVINCE" WHERE
"INACTIVE" = 'N' ORDER BY "PROV_NAME""
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_Position"
SelectCommand="SELECT ID, PARAMETER_CODE, PARAMETER_VALUE, PAR_ID,
START_VALUE, END_VALUE, INPUT_BY, INPUT_DATE, UPDATE_BY,
UPDATE_DATE FROM GNRL_PARAMETER_VALUE WHERE (PAR_ID IN ('3',
'4'))" ConnectionString="<%$ ConnectionStrings:ConnectionString
%>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_Gnrl_parameter"
SelectCommand="SELECT "ID", "PARAMETER_CODE",
"PARAMETER_VALUE", "PAR_ID" FROM
"GNRL_PARAMETER_VALUE" WHERE ("PAR_ID" =
:PAR_ID)" ConnectionString="<%$ ConnectionStrings:ConnectionString
%>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"><SelectParameters>
<asp:Parameter Type="Decimal" DefaultValue="10"
Name="PAR_ID"></asp:Parameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_City"
SelectCommand="SELECT "ID", "PROV_ID",
"CITY_CODE", "CITY_NAME",
"INACTIVE", "REGION_ID",
"POSTAL_CODE" FROM "GNRL_REF_CITY" WHERE
(("PROV_ID" = :PROV_ID) AND ("INACTIVE" =
:INACTIVE)) ORDER BY "CITY_NAME"" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"><SelectParameters>
<asp:ControlParameter PropertyName="SelectedValue" Type="Decimal"
DefaultValue="1" Name="PROV_ID"
ControlID="PROV_ID"></asp:ControlParameter>
<asp:Parameter Type="String" DefaultValue="N"
Name="INACTIVE"></asp:Parameter>
</SelectParameters>
219
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="SqlDataSource1"
SelectCommand="SELECT id,emp_name, emp_code, id_user
,utility_pkg.load_description(city_id, 'CITY') city
,utility_pkg.load_description(prov_id, 'PROVINCE')
province
,nick_name, DECODE(sex,'L','MALE', 'P', 'FEMALE') sex,
id_no, id_type, id_expired, mobile_no, date_birth, place_birth,
address
,DECODE(comp_id, NULL,
'??',utility_pkg.load_description(comp_id, 'COMPANY')) comp
,id_parent
,DECODE(id_parent, NULL, '',utility_pkg.load_description(id_parent, 'OWNER')) owner
,utility_pkg.get_parvalue(id_position) position
FROM emp_store
ORDER BY input_date desc" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_EmpStore"
SelectCommand="SELECT * FROM "EMP_STORE" ORDER BY
"EMP_NAME""
OldValuesParameterFormatString="original_{0}"
ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM
"EMP_STORE" WHERE "ID" = :original_ID AND
(("EMP_NAME" = :original_EMP_NAME) OR
("EMP_NAME" IS NULL AND :original_EMP_NAME IS NULL)) AND
(("EMP_CODE" = :original_EMP_CODE) OR
("EMP_CODE" IS NULL AND :original_EMP_CODE IS NULL)) AND
(("ID_USER" = :original_ID_USER) OR ("ID_USER"
IS NULL AND :original_ID_USER IS NULL)) AND (("CITY_ID"
= :original_CITY_ID) OR ("CITY_ID" IS NULL AND
:original_CITY_ID IS NULL)) AND (("PROV_ID" =
:original_PROV_ID) OR ("PROV_ID" IS NULL AND
:original_PROV_ID IS NULL)) AND (("NICK_NAME" =
:original_NICK_NAME) OR ("NICK_NAME" IS NULL AND
:original_NICK_NAME IS NULL)) AND (("SEX" =
:original_SEX) OR ("SEX" IS NULL AND :original_SEX IS
NULL)) AND (("ID_NO" = :original_ID_NO) OR
("ID_NO" IS NULL AND :original_ID_NO IS NULL)) AND
(("ID_TYPE" = :original_ID_TYPE) OR ("ID_TYPE"
IS NULL AND :original_ID_TYPE IS NULL)) AND
(("ID_EXPIRED" = :original_ID_EXPIRED) OR
("ID_EXPIRED" IS NULL AND :original_ID_EXPIRED IS NULL))
AND (("MOBILE_NO" = :original_MOBILE_NO) OR
("MOBILE_NO" IS NULL AND :original_MOBILE_NO IS NULL))
AND (("DATE_BIRTH" = :original_DATE_BIRTH) OR
("DATE_BIRTH" IS NULL AND :original_DATE_BIRTH IS NULL))
AND (("PLACE_BIRTH" = :original_PLACE_BIRTH) OR
("PLACE_BIRTH" IS NULL AND :original_PLACE_BIRTH IS
NULL)) AND (("ADDRESS" = :original_ADDRESS) OR
("ADDRESS" IS NULL AND :original_ADDRESS IS NULL)) AND
(("INPUT_DATE" = :original_INPUT_DATE) OR
("INPUT_DATE" IS NULL AND :original_INPUT_DATE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
(("UPDATE_DATE" = :original_UPDATE_DATE) OR
("UPDATE_DATE" IS NULL AND :original_UPDATE_DATE IS
220
NULL)) AND (("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))
AND (("COMP_ID" = :original_COMP_ID) OR
("COMP_ID" IS NULL AND :original_COMP_ID IS NULL)) AND
(("ID_PARENT" = :original_ID_PARENT) OR
("ID_PARENT" IS NULL AND :original_ID_PARENT IS NULL))
AND (("ID_POSITION" = :original_ID_POSITION) OR
("ID_POSITION" IS NULL AND :original_ID_POSITION IS
NULL))" InsertCommand="INSERT INTO "EMP_STORE"
("ID", "EMP_NAME", "EMP_CODE",
"ID_USER", "CITY_ID", "PROV_ID",
"NICK_NAME", "SEX", "ID_NO",
"ID_TYPE", "ID_EXPIRED",
"MOBILE_NO", "DATE_BIRTH",
"PLACE_BIRTH", "ADDRESS",
"INPUT_DATE", "INPUT_BY",
"UPDATE_DATE", "UPDATE_BY",
"COMP_ID", "ID_PARENT",
"ID_POSITION") VALUES (:ID, :EMP_NAME, :EMP_CODE,
:ID_USER, :CITY_ID, :PROV_ID, :NICK_NAME, :SEX, :ID_NO, :ID_TYPE,
:ID_EXPIRED, :MOBILE_NO, :DATE_BIRTH, :PLACE_BIRTH, :ADDRESS,
:INPUT_DATE, :INPUT_BY, :UPDATE_DATE, :UPDATE_BY, :COMP_ID,
:ID_PARENT, :ID_POSITION)" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
UpdateCommand="UPDATE "EMP_STORE" SET
"EMP_NAME" = :EMP_NAME, "EMP_CODE" =
:EMP_CODE, "ID_USER" = :ID_USER, "CITY_ID" =
:CITY_ID, "PROV_ID" = :PROV_ID, "NICK_NAME" =
:NICK_NAME, "SEX" = :SEX, "ID_NO" = :ID_NO,
"ID_TYPE" = :ID_TYPE, "ID_EXPIRED" =
:ID_EXPIRED, "MOBILE_NO" = :MOBILE_NO,
"DATE_BIRTH" = :DATE_BIRTH, "PLACE_BIRTH" =
:PLACE_BIRTH, "ADDRESS" = :ADDRESS,
"INPUT_DATE" = :INPUT_DATE, "INPUT_BY" =
:INPUT_BY, "UPDATE_DATE" = :UPDATE_DATE,
"UPDATE_BY" = :UPDATE_BY, "COMP_ID" =
:COMP_ID, "ID_PARENT" = :ID_PARENT,
"ID_POSITION" = :ID_POSITION WHERE "ID" =
:original_ID AND (("EMP_NAME" = :original_EMP_NAME) OR
("EMP_NAME" IS NULL AND :original_EMP_NAME IS NULL)) AND
(("EMP_CODE" = :original_EMP_CODE) OR
("EMP_CODE" IS NULL AND :original_EMP_CODE IS NULL)) AND
(("ID_USER" = :original_ID_USER) OR ("ID_USER"
IS NULL AND :original_ID_USER IS NULL)) AND (("CITY_ID"
= :original_CITY_ID) OR ("CITY_ID" IS NULL AND
:original_CITY_ID IS NULL)) AND (("PROV_ID" =
:original_PROV_ID) OR ("PROV_ID" IS NULL AND
:original_PROV_ID IS NULL)) AND (("NICK_NAME" =
:original_NICK_NAME) OR ("NICK_NAME" IS NULL AND
:original_NICK_NAME IS NULL)) AND (("SEX" =
:original_SEX) OR ("SEX" IS NULL AND :original_SEX IS
NULL)) AND (("ID_NO" = :original_ID_NO) OR
("ID_NO" IS NULL AND :original_ID_NO IS NULL)) AND
(("ID_TYPE" = :original_ID_TYPE) OR ("ID_TYPE"
IS NULL AND :original_ID_TYPE IS NULL)) AND
(("ID_EXPIRED" = :original_ID_EXPIRED) OR
("ID_EXPIRED" IS NULL AND :original_ID_EXPIRED IS NULL))
AND (("MOBILE_NO" = :original_MOBILE_NO) OR
221
("MOBILE_NO" IS NULL AND :original_MOBILE_NO IS NULL))
AND (("DATE_BIRTH" = :original_DATE_BIRTH) OR
("DATE_BIRTH" IS NULL AND :original_DATE_BIRTH IS NULL))
AND (("PLACE_BIRTH" = :original_PLACE_BIRTH) OR
("PLACE_BIRTH" IS NULL AND :original_PLACE_BIRTH IS
NULL)) AND (("ADDRESS" = :original_ADDRESS) OR
("ADDRESS" IS NULL AND :original_ADDRESS IS NULL)) AND
(("INPUT_DATE" = :original_INPUT_DATE) OR
("INPUT_DATE" IS NULL AND :original_INPUT_DATE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
(("UPDATE_DATE" = :original_UPDATE_DATE) OR
("UPDATE_DATE" IS NULL AND :original_UPDATE_DATE IS
NULL)) AND (("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))
AND (("COMP_ID" = :original_COMP_ID) OR
("COMP_ID" IS NULL AND :original_COMP_ID IS NULL)) AND
(("ID_PARENT" = :original_ID_PARENT) OR
("ID_PARENT" IS NULL AND :original_ID_PARENT IS NULL))
AND (("ID_POSITION" = :original_ID_POSITION) OR
("ID_POSITION" IS NULL AND :original_ID_POSITION IS
NULL))"><InsertParameters>
<asp:Parameter Type="Decimal" Name="ID"></asp:Parameter>
<asp:Parameter Type="String" Name="EMP_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="EMP_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_USER"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="CITY_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="NICK_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="SEX"></asp:Parameter>
<asp:Parameter Type="String" Name="ID_NO"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_TYPE"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="ID_EXPIRED"></asp:Parameter>
<asp:Parameter Type="String" Name="MOBILE_NO"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="DATE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String" Name="PLACE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_PARENT"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_POSITION"></asp:Parameter>
</InsertParameters>
<UpdateParameters>
<asp:Parameter Type="String" Name="EMP_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="EMP_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_USER"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="CITY_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="NICK_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="SEX"></asp:Parameter>
<asp:Parameter Type="String" Name="ID_NO"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_TYPE"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="ID_EXPIRED"></asp:Parameter>
<asp:Parameter Type="String" Name="MOBILE_NO"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="DATE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String" Name="PLACE_BIRTH"></asp:Parameter>
222
<asp:Parameter Type="String" Name="ADDRESS"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_PARENT"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_POSITION"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_EMP_NAME"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_EMP_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_USER"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_CITY_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_NICK_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="original_SEX"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ID_NO"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_TYPE"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_ID_EXPIRED"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_MOBILE_NO"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_DATE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_PLACE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ADDRESS"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_PARENT"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_POSITION"></asp:Parameter>
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_EMP_NAME"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_EMP_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_USER"></asp:Parameter>
223
<asp:Parameter Type="Decimal"
Name="original_CITY_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_NICK_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="original_SEX"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ID_NO"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_TYPE"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_ID_EXPIRED"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_MOBILE_NO"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_DATE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_PLACE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ADDRESS"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_PARENT"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_POSITION"></asp:Parameter>
</DeleteParameters>
</asp:SqlDataSource>
</td>
</tr>
</TBODY></TABLE></dx:PanelContent>
</panelcollection>
<noheadertopedge backcolor="#EBF2F4">
</noheadertopedge>
<Content>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpContentBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</Content>
</dx:ASPxRoundPanel><br />
</div>
</form>
 
</asp:Content>
EditRegistrasiOwner.aspx.cs
224
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
CJM.Database.Oracle;
System.Data.OracleClient;
CJM.Reference;
CJM.Project.LGE;
System.Drawing;
DevExpress.Web.ASPxEditors;
public partial class AppModules_Default2 : System.Web.UI.Page
{
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = buzdomain.com)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =blitz.buzdomain.com))); User
Id=buzapps; password=qwerty007;";
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = blitz.co.id)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =buzdev))); User Id=buzapps;
password=qwerty007;";
string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =xronosit))); User
Id=buzapps; password=qwerty007;";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string idmenu = "4";
string iduser = Session["SESS_USER_ID"].ToString();
string batasan = RefDB.editVal(iduser, idmenu);
string edit = Convert.ToString(Request["id_edit"]);
string delete =
Convert.ToString(Request["id_delete"]);
if (Session["SESS_USER_ID"] == null)
{
Response.Redirect("../LogOut.aspx");
}
//============================= cek caption
=================
if (Session["SESS_LANG"] == "english")
{
Caption1.Text = "Name";
Caption2.Text = "Mobile No";
225
Caption3.Text = "Sex";
Caption4.Text = "Nick Name";
Caption5.Text = "Date Birth";
Caption6.Text = "Place Birth";
Caption7.Text = "Manage Partner";
//Caption8.Text = "User Name";
//Caption9.Text = "Password";
Caption10.Text = "ID No";
Caption11.Text = "Type";
Caption12.Text = "Expired Date";
Caption13.Text = "Address";
Caption14.Text = "Province";
Caption15.Text = "City";
Caption16.Text = "Register Date";
CaptionUtama.Text = "Owner Registration";
}
if (Session["SESS_LANG"] == "indonesia")
{
Caption1.Text = "Nama";
Caption2.Text = "No. HP";
Caption3.Text = "Jenis Kelamin";
Caption4.Text = "Nama Panggilan";
Caption5.Text = "Tgl. Lahir";
Caption6.Text = "Tempat Lahir";
Caption7.Text = "Manage Partner";
//Caption8.Text = "User Name";
//Caption9.Text = "Password";
Caption10.Text = "No. Identitas";
Caption11.Text = "Tipe";
Caption12.Text = "Tanggal Habis";
Caption13.Text = "Alamat";
Caption14.Text = "Propinsi";
Caption15.Text = "Kota";
Caption16.Text = "Tgl. Registrasi";
CaptionUtama.Text = "Registrasi Pemilik";
}
if (batasan == "Y")
{
if ((edit != null)&&(delete == null))
{
PROV_ID.Items.Insert(0, new ListItem("-- chose
--", ""));
CITY_ID.Items.Insert(0, new ListItem("-- chose
--", ""));
ID_TYPE.Items.Insert(0, new ListItem("-- chose
--", ""));
OracleConnection conn = new
OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
226
string query = " SELECT
EMP_NAME,MOBILE_NO,CITY_ID,PROV_ID,NICK_NAME,SEX,PLACE_BIRTH,ADDRE
SS," +
"ID_NO, ID_TYPE,
ID_EXPIRED,DATE_BIRTH,ID, MANAGE_PARTNER, REGISTER_DATE FROM
EMP_STORE WHERE ID ='" + edit + "'";
OracleCommand cmd = new
OracleCommand(query, conn);
OracleDataReader ds = cmd.ExecuteReader();
if (ds.HasRows == false)
{
throw new Exception();
}
if (ds.Read())
{
EMP_NAME.Text =
ds["EMP_NAME"].ToString();
MOBILE_NO.Text =
ds["MOBILE_NO"].ToString();
CITY_ID.SelectedValue =
ds["CITY_ID"].ToString();
PROV_ID.SelectedValue =
ds["PROV_ID"].ToString();
NICK_NAME.Text =
ds["NICK_NAME"].ToString();
SEX.SelectedValue =
ds["SEX"].ToString();
PLACE_BIRTH.Text =
ds["PLACE_BIRTH"].ToString();
//========== pengaturan tanggal lahir
iDATE_BIRTH.Value =
ForNET.DateFromDB(ds["DATE_BIRTH"].ToString());
sDATE_BIRTH.Text =
ForNET.DateFromDB(ds["DATE_BIRTH"].ToString());
ADDRESS.Text =
ds["ADDRESS"].ToString();
MANAGEPARTNER.SelectedValue =
ds["MANAGE_PARTNER"].ToString();
//========== pengaturan tanggal
Registrasi
iREGISTER_DATE.Value =
ForNET.DateFromDB(ds["REGISTER_DATE"].ToString());
sREGISTER_DATE.Text =
ForNET.DateFromDB(ds["REGISTER_DATE"].ToString());
ID_NO.Text = ds["ID_NO"].ToString();
227
ID_TYPE.SelectedValue =
ds["ID_TYPE"].ToString();
//========== pengaturan tanggal ID
TYPE
iID_EXPIRED.Value =
ForNET.DateFromDB(ds["ID_EXPIRED"].ToString());
sID_EXPIRED.Text =
ForNET.DateFromDB(ds["ID_EXPIRED"].ToString());
}
}
catch (Exception)
{
}
finally
{
//conn.Dispose();
}
}
if ((edit == null) && (delete != null))
{
string QUERYDELETE = "DELETE EMP_STORE WHERE
ID = '" + delete + "'";
bool SUKSESDELETE =
ConnOracle.ExecNonQueryConnOra(QUERYDELETE);
if ((delete != "")&&(SUKSESDELETE))
{
ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Delete Owner Success'); window.location.href =
'RegistrasiOwner.aspx';", true);
}
else
{
ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Delete Owner Failed'); window.location.href =
'RegistrasiOwner.aspx';", true);
}
}
}
else
{
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "alert('Maaf pada halaman ini anda tidak memiliki
akses Update'); window.location.href = 'RegistrasiOwner.aspx';",
true);
228
//Alert.Show("Maaf pada halaman ini anda tidak
memiliki akses Update");
}
}
}
protected void MOBILE_NO_TextChanged(object sender, EventArgs
e)
{
System.Threading.Thread.Sleep(1000);
string xMOBILE_NO = MOBILE_NO.Text;
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
string querys = " SELECT COUNT(MOBILE_NO) AS JML FROM
EMP_STORE WHERE MOBILE_NO ='" + xMOBILE_NO + "'";
OracleCommand cmd = new OracleCommand(querys, conn);
OracleDataReader dc = cmd.ExecuteReader();
if (dc.HasRows == false)
{
throw new Exception();
}
if (dc.Read())
{
string jumlah = dc["JML"].ToString();
if (jumlah.ToString() == "0")
{
CITY_ID.Enabled = true;
PROV_ID.Enabled = true;
NICK_NAME.Enabled = true;
SEX.Enabled = true;
PLACE_BIRTH.Enabled = true;
ADDRESS.Enabled = true;
ID_NO.Enabled = true;
ID_TYPE.Enabled = true;
iID_EXPIRED.Enabled = true;
ASPxButton2.Enabled = true;
iDATE_BIRTH.Enabled = true;
iREGISTER_DATE.Enabled = true;
MANAGEPARTNER.Enabled = true;
//USERNAME.Enabled = true;
//PASSWORD.Enabled = true;
Label1.Text = "Your account available";
229
}
else
{
CITY_ID.Enabled = false;
PROV_ID.Enabled = false;
NICK_NAME.Enabled = false;
SEX.Enabled = false;
PLACE_BIRTH.Enabled = false;
ADDRESS.Enabled = false;
ID_NO.Enabled = false;
ID_TYPE.Enabled = false;
iID_EXPIRED.Enabled = false;
ASPxButton2.Enabled = false;
iDATE_BIRTH.Enabled = false;
iREGISTER_DATE.Enabled = false;
MANAGEPARTNER.Enabled = false;
//USERNAME.Enabled = false;
//PASSWORD.Enabled = false;
Label1.Text = "Your account already
registered";
}
}
}
catch (Exception)
{
}
finally
{
conn.Dispose();
}
}
protected void PROV_ID_SelectedIndexChanged(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
}
//========= event Update
protected void ASPxButton1_Click(object sender, EventArgs e)
{
string oEMP_NAME = EMP_NAME.Text;
string oCITY_ID = CITY_ID.SelectedItem.Value;
string oPROV_ID = PROV_ID.SelectedItem.Value;
string oNICK_NAME = NICK_NAME.Text;
string oSEX = SEX.SelectedValue;
string oMOBILE_NO = MOBILE_NO.Text;
string oPLACE_BIRTH = PLACE_BIRTH.Text;
string oADDRESS = ADDRESS.Text;
string oID_NO = ID_NO.Text;
string oID_TYPE = ID_TYPE.SelectedItem.Value;
string oTextBox1 = TextBox1.Text;
230
string oMANAGEPARTNER = MANAGEPARTNER.SelectedItem.Value;
string editID = Convert.ToString(Request["id_edit"]);
//=========== setting variable tanggal Register
string oDATE_REGISTER = iREGISTER_DATE.Text;
if (oDATE_REGISTER != "")
{
oDATE_REGISTER =
ForNET.DateToDB(oDATE_REGISTER.ToString());
}
if (oDATE_REGISTER == "")
{
oDATE_REGISTER = ForNET.DateToDB(sREGISTER_DATE.Text);
}
//=========== setting variable tanggal lahir
string oDATE_BIRTH = iDATE_BIRTH.Text;
if (oDATE_BIRTH != "")
{
oDATE_BIRTH = ForNET.DateToDB(oDATE_BIRTH.ToString());
}
if (oDATE_BIRTH == "")
{
oDATE_BIRTH = ForNET.DateToDB(sDATE_BIRTH.Text);
}
//=========== setting variable tanggal Type ID
string oID_EXPIRED = iID_EXPIRED.Text;
if (oID_EXPIRED != "")
{
oID_EXPIRED = ForNET.DateToDB(oID_EXPIRED.ToString());
}
if (oID_EXPIRED == "")
{
oID_EXPIRED = ForNET.DateToDB(sID_EXPIRED.Text);
}
/* ---------------------------------------------------------------------INSERT KE TABLE EMP_STORE
-----------------------------------------------------------------------**/
string myQueryCitys = "UPDATE EMP_STORE SET " +
"EMP_NAME
='" + oEMP_NAME + "',
" +
"ID_USER
='" +
Session["SESS_USER_ID"] + "', " +
"CITY_ID
='" + oCITY_ID + "', "
+
"PROV_ID
='" + oPROV_ID + "', "
+
"NICK_NAME
='" + oNICK_NAME + "',
" +
"SEX
='" + oSEX + "'," +
231
"MOBILE_NO
='" + oMOBILE_NO + "',
"DATE_BIRTH
=" + oDATE_BIRTH + ",
"PLACE_BIRTH
='" + oPLACE_BIRTH +
"ADDRESS
='" + oADDRESS + "',"
" +
" +
"', " +
+
"COMP_ID
Session["SESS_COMP_ID"] + "', " +
"ID_NO
"ID_TYPE
+
"REGISTER_DATE
", " +
"ID_EXPIRED
+
" WHERE ID
='" +
='" + oID_NO + "', " +
='" + oID_TYPE + "', "
=" + oDATE_REGISTER +
=" + oID_EXPIRED + " "
='" + editID + "'";
bool suksesUpdatetCity =
ConnOracle.ExecNonQueryConnOra(myQueryCitys);
if (suksesUpdatetCity)
{
EMP_NAME.Text = "";
CITY_ID.SelectedItem.Text
PROV_ID.SelectedItem.Text
NICK_NAME.Text = "";
SEX.SelectedItem.Selected
MOBILE_NO.Text = "";
PLACE_BIRTH.Text = "";
ADDRESS.Text = "";
ID_NO.Text = "";
ID_TYPE.SelectedItem.Text
iID_EXPIRED.Text = "";
iREGISTER_DATE.Text = "";
= "";
= "";
= false;
= "";
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "alert('Update Owner Success');
window.location.href = 'RegistrasiOwner.aspx';", true);
}
else
{
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "alert('Update Owner Failed');
window.location.href = 'RegistrasiOwner.aspx';", true);
}
}
//=========== event Cancel
protected void ASPxButton2_Click(object sender, EventArgs e)
{
Response.Redirect("RegistrasiOwner.aspx");
}
232
}
EditRegistrasiToko.aspx
<%@ Page Language="C#" MasterPageFile="MasterPage.master"
AutoEventWireup="true" CodeFile="EditRegistrasiToko.aspx.cs"
Inherits="AppModules_RegToko" Title="Sales Management System"
EnableEventValidation="false" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
<div style="text-align: left">
<!-- ======================== TABLE UTAMA
=========================== -->
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
BackColor="#EBF2F4"
CssFilePath="~/App_Themes/Glass/{0}/styles.css"
CssPostfix="Glass" HeaderText="Edit Store
Registration"
SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css"
Width="200px">
<leftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"></Background
Image>
</leftedge>
<headercontent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpHeaderBack.gif"></BackgroundIma
ge>
</headercontent>
<contentpaddings PaddingBottom="10px"
PaddingLeft="4px" PaddingTop="10px"></contentpaddings>
<rightedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"></Background
Image>
</rightedge>
<headerrightedge>
233
<BackgroundImage VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpHeaderRightEdge.gif"></Backgrou
ndImage>
</headerrightedge>
<border bordercolor="#7EACB1" borderstyle="Solid"
borderwidth="1px"></border>
<headerstyle backcolor="White" Height="23px">
<BorderBottom BorderStyle="None"></BorderBottom>
<Paddings PaddingBottom="0px" PaddingLeft="2px"
PaddingTop="0px" />
</headerstyle>
<headerleftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpHeaderLeftEdge.gif"></Backgroun
dImage>
</headerleftedge>
<bottomedge BackColor="#D7E9F1">
</bottomedge>
<panelcollection>
<dx:PanelContent runat="server"><TABLE width="900"><TBODY><TR><TD
colSpan=6><asp:ScriptManager runat="server"
ID="ScriptManager1"></asp:ScriptManager>
<asp:Label runat="server" Width="363px" ID="CaptionUtama"
Visible="False"></asp:Label>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption1"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel1"><ContentTemplate>
<asp:DropDownList id="iID_EMP" runat="server"
DataSourceID="Table_emp" __designer:wfdid="w58"
DataTextField="EMP_NAME" DataValueField="ID"></asp:DropDownList>
<asp:TextBox id="idedit" runat="server" __designer:wfdid="w6"
Visible="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 129px" vAlign=top
align="right"> <asp:Label runat="server" Width="150px"
ID="Caption12"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><dx:ASPxDateEdit runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" EditFormatString="dd/MM/yy" EditFormat="Custom"
ID="Reg_date" ShowShadow="False"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css" TabIndex="7">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<CalendarProperties>
<FooterStyle Spacing="17px"></FooterStyle>
<HeaderStyle Spacing="1px"></HeaderStyle>
</CalendarProperties>
<DropDownButton>
234
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
</dx:ASPxDateEdit>
<asp:TextBox ID="sReg_date" runat="server"
Visible="False"></asp:TextBox>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption2"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><SPAN style="FONT-SIZE: 10pt; COLOR:
#ff0033"><asp:UpdatePanel runat="server"
ID="UpdatePanel2"><ContentTemplate>
<asp:TextBox id="STORE_NAME" tabIndex=2 runat="server"
__designer:wfdid="w11"></asp:TextBox> <BR />
</ContentTemplate>
</asp:UpdatePanel>
</SPAN></TD><TD style="WIDTH: 129px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption7"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel7"><ContentTemplate>
<asp:TextBox id="ADDRESS" tabIndex=8 runat="server"
__designer:wfdid="w14" TextMode="MultiLine" ReadOnly="True"
Enabled="False"></asp:TextBox> 
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption3"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><SPAN style="FONT-SIZE: 10pt; COLOR:
#ff0033"><asp:UpdatePanel runat="server"
ID="UpdatePanel3"><ContentTemplate>
<asp:DropDownList id="STORE_TYPE" tabIndex=3 runat="server"
DataSourceID="Table_parameter_value" __designer:wfdid="w18"
DataTextField="PARAMETER_VALUE"
DataValueField="STORE_TYPE"></asp:DropDownList> <BR />
</ContentTemplate>
</asp:UpdatePanel>
</SPAN></TD><TD style="WIDTH: 129px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption8"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel9"><ContentTemplate>
<asp:TextBox id="FLOOR" tabIndex=9 runat="server" Width="47px"
__designer:wfdid="w20"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption4"></asp:Label>
235
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel4"><ContentTemplate>
<asp:DropDownList id="ID_MALL" runat="server"
DataSourceID="table_mall" __designer:wfdid="w59"
DataTextField="MALL_NAME" DataValueField="ID"
OnSelectedIndexChanged="ID_MALL_SelectedIndexChanged"
AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress1"
AssociatedUpdatePanelID="UpdatePanel4"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress1" runat="server"
Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w25"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD><TD style="WIDTH: 129px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption9"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel10"><ContentTemplate>
<asp:TextBox id="BLOCK_STORE" tabIndex=10 runat="server"
Width="47px" __designer:wfdid="w28"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption5"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel5"><ContentTemplate>
<asp:TextBox id="TextBox1" tabIndex=5 runat="server"
__designer:wfdid="w31" Visible="False" ReadOnly="True"
Enabled="False"></asp:TextBox><asp:DropDownList id="combo_prov"
runat="server" EnableViewState="False" DataSourceID="table_prov"
__designer:wfdid="w62" DataTextField="PROV_NAME"
DataValueField="PROV_ID"
OnSelectedIndexChanged="combo_prov_SelectedIndexChanged1"
AutoPostBack="True"></asp:DropDownList><BR /><asp:TextBox
id="PROV_ID" tabIndex=5 runat="server" __designer:wfdid="w33"
Visible="False" ReadOnly="True" Enabled="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel> 
<asp:UpdateProgress runat="server" ID="UpdateProgress2"
AssociatedUpdatePanelID="UpdatePanel5"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress2" runat="server"
Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w35"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD><TD style="WIDTH: 129px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption10"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel8"><ContentTemplate>
236
<asp:TextBox id="BLOCK_NO" tabIndex=11 runat="server" Width="47px"
__designer:wfdid="w38"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption6"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel6"><ContentTemplate>
<asp:TextBox id="TextBox2" tabIndex=6 runat="server"
__designer:wfdid="w41" Visible="False" ReadOnly="True"
Enabled="False"></asp:TextBox> <BR /><asp:DropDownList
id="combo_city" runat="server" EnableViewState="False"
DataSourceID="table_city" __designer:wfdid="w61"
DataTextField="CITY_NAME" DataValueField="CITY_ID"
AppendDataBoundItems="True"></asp:DropDownList>  <asp:TextBox
id="CITY_ID" tabIndex=6 runat="server" __designer:wfdid="w43"
Visible="False" ReadOnly="True"
Enabled="False"></asp:TextBox> 
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 129px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption11"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel11"><ContentTemplate>
<asp:TextBox id="PHONE" tabIndex=12 runat="server"
__designer:wfdid="w46"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="HEIGHT: 30px; TEXT-ALIGN: left"
colSpan=7></TD></TR><TR><TD style="TEXT-ALIGN: left"
colSpan=7><asp:UpdatePanel runat="server"
ID="UpdatePanel13"><ContentTemplate>
<TABLE style="WIDTH: 141px"><TBODY><TR><TD><dx:ASPxButton
id="ASPxButton2" onclick="ASPxButton2_Click" runat="server"
Width="80px" CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
__designer:wfdid="w48" Text="Update"></dx:ASPxButton>
<dx:ASPxButton id="ASPxButton3" onclick="ASPxButton3_Click"
runat="server" Width="80px" CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
__designer:wfdid="w49" Visible="False"
Text="Update"></dx:ASPxButton></TD><TD style="WIDTH:
3px"><dx:ASPxButton id="ASPxButton1" onclick="ASPxButton1_Click"
runat="server" Width="80px" CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
__designer:wfdid="w50" Text="Cancel"
CausesValidation="False"></dx:ASPxButton></TD></TR></TBODY></TABLE
>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD colSpan=7>
<HR style="WIDTH: 101%" color=#006fae />
</TD></TR><TR><TD colSpan=7>
237
 <!-- ============================================= DATA
GRID =============================================================
--><!-- ============================================= AKHIR DATA
GRID =============================================================
--><asp:SqlDataSource runat="server" ID="Table_Store"
SelectCommand="SELECT * FROM "GNRL_REF_STORE""
OldValuesParameterFormatString="original_{0}"
ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM
"GNRL_REF_STORE" WHERE "ID" = :original_ID AND
(("STORE_CODE" = :original_STORE_CODE) OR
("STORE_CODE" IS NULL AND :original_STORE_CODE IS NULL))
AND (("ID_EMP" = :original_ID_EMP) OR
("ID_EMP" IS NULL AND :original_ID_EMP IS NULL)) AND
(("ID_MALL" = :original_ID_MALL) OR ("ID_MALL"
IS NULL AND :original_ID_MALL IS NULL)) AND
(("STORE_NAME" = :original_STORE_NAME) OR
("STORE_NAME" IS NULL AND :original_STORE_NAME IS NULL))
AND (("PROV_ID" = :original_PROV_ID) OR
("PROV_ID" IS NULL AND :original_PROV_ID IS NULL)) AND
(("CITY_ID" = :original_CITY_ID) OR ("CITY_ID"
IS NULL AND :original_CITY_ID IS NULL)) AND (("FLOOR" =
:original_FLOOR) OR ("FLOOR" IS NULL AND :original_FLOOR
IS NULL)) AND (("BLOCK_STORE" = :original_BLOCK_STORE)
OR ("BLOCK_STORE" IS NULL AND :original_BLOCK_STORE IS
NULL)) AND (("PHONE" = :original_PHONE) OR
("PHONE" IS NULL AND :original_PHONE IS NULL)) AND
(("INPUT_DATE" = :original_INPUT_DATE) OR
("INPUT_DATE" IS NULL AND :original_INPUT_DATE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
(("UPDATE_DATE" = :original_UPDATE_DATE) OR
("UPDATE_DATE" IS NULL AND :original_UPDATE_DATE IS
NULL)) AND (("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))
AND (("COMP_ID" = :original_COMP_ID) OR
("COMP_ID" IS NULL AND :original_COMP_ID IS NULL)) AND
(("STORE_TYPE" = :original_STORE_TYPE) OR
("STORE_TYPE" IS NULL AND :original_STORE_TYPE IS NULL))
AND (("STORE_SEGMENT" = :original_STORE_SEGMENT) OR
("STORE_SEGMENT" IS NULL AND :original_STORE_SEGMENT IS
NULL)) AND (("BLOCK_NO" = :original_BLOCK_NO) OR
("BLOCK_NO" IS NULL AND :original_BLOCK_NO IS NULL)) AND
(("ADDRESS" = :original_ADDRESS) OR ("ADDRESS"
IS NULL AND :original_ADDRESS IS NULL))" InsertCommand="INSERT
INTO "GNRL_REF_STORE" ("ID",
"STORE_CODE", "ID_EMP", "ID_MALL",
"STORE_NAME", "PROV_ID", "CITY_ID",
"FLOOR", "BLOCK_STORE", "PHONE",
"INPUT_DATE", "INPUT_BY",
"UPDATE_DATE", "UPDATE_BY",
"COMP_ID", "STORE_TYPE",
"STORE_SEGMENT", "BLOCK_NO",
"ADDRESS") VALUES (:ID, :STORE_CODE, :ID_EMP, :ID_MALL,
:STORE_NAME, :PROV_ID, :CITY_ID, :FLOOR, :BLOCK_STORE, :PHONE,
:INPUT_DATE, :INPUT_BY, :UPDATE_DATE, :UPDATE_BY, :COMP_ID,
:STORE_TYPE, :STORE_SEGMENT, :BLOCK_NO, :ADDRESS)"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" UpdateCommand="UPDATE "GNRL_REF_STORE" SET
238
"STORE_CODE" = :STORE_CODE, "ID_EMP" =
:ID_EMP, "ID_MALL" = :ID_MALL, "STORE_NAME" =
:STORE_NAME, "PROV_ID" = :PROV_ID, "CITY_ID" =
:CITY_ID, "FLOOR" = :FLOOR, "BLOCK_STORE" =
:BLOCK_STORE, "PHONE" = :PHONE, "INPUT_DATE" =
:INPUT_DATE, "INPUT_BY" = :INPUT_BY,
"UPDATE_DATE" = :UPDATE_DATE, "UPDATE_BY" =
:UPDATE_BY, "COMP_ID" = :COMP_ID, "STORE_TYPE"
= :STORE_TYPE, "STORE_SEGMENT" = :STORE_SEGMENT,
"BLOCK_NO" = :BLOCK_NO, "ADDRESS" = :ADDRESS
WHERE "ID" = :original_ID AND (("STORE_CODE" =
:original_STORE_CODE) OR ("STORE_CODE" IS NULL AND
:original_STORE_CODE IS NULL)) AND (("ID_EMP" =
:original_ID_EMP) OR ("ID_EMP" IS NULL AND
:original_ID_EMP IS NULL)) AND (("ID_MALL" =
:original_ID_MALL) OR ("ID_MALL" IS NULL AND
:original_ID_MALL IS NULL)) AND (("STORE_NAME" =
:original_STORE_NAME) OR ("STORE_NAME" IS NULL AND
:original_STORE_NAME IS NULL)) AND (("PROV_ID" =
:original_PROV_ID) OR ("PROV_ID" IS NULL AND
:original_PROV_ID IS NULL)) AND (("CITY_ID" =
:original_CITY_ID) OR ("CITY_ID" IS NULL AND
:original_CITY_ID IS NULL)) AND (("FLOOR" =
:original_FLOOR) OR ("FLOOR" IS NULL AND :original_FLOOR
IS NULL)) AND (("BLOCK_STORE" = :original_BLOCK_STORE)
OR ("BLOCK_STORE" IS NULL AND :original_BLOCK_STORE IS
NULL)) AND (("PHONE" = :original_PHONE) OR
("PHONE" IS NULL AND :original_PHONE IS NULL)) AND
(("INPUT_DATE" = :original_INPUT_DATE) OR
("INPUT_DATE" IS NULL AND :original_INPUT_DATE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
(("UPDATE_DATE" = :original_UPDATE_DATE) OR
("UPDATE_DATE" IS NULL AND :original_UPDATE_DATE IS
NULL)) AND (("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))
AND (("COMP_ID" = :original_COMP_ID) OR
("COMP_ID" IS NULL AND :original_COMP_ID IS NULL)) AND
(("STORE_TYPE" = :original_STORE_TYPE) OR
("STORE_TYPE" IS NULL AND :original_STORE_TYPE IS NULL))
AND (("STORE_SEGMENT" = :original_STORE_SEGMENT) OR
("STORE_SEGMENT" IS NULL AND :original_STORE_SEGMENT IS
NULL)) AND (("BLOCK_NO" = :original_BLOCK_NO) OR
("BLOCK_NO" IS NULL AND :original_BLOCK_NO IS NULL)) AND
(("ADDRESS" = :original_ADDRESS) OR ("ADDRESS"
IS NULL AND :original_ADDRESS IS NULL))"><InsertParameters>
<asp:Parameter Type="Decimal" Name="ID"></asp:Parameter>
<asp:Parameter Type="String" Name="STORE_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_EMP"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_MALL"></asp:Parameter>
<asp:Parameter Type="String" Name="STORE_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="CITY_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="FLOOR"></asp:Parameter>
<asp:Parameter Type="String" Name="BLOCK_STORE"></asp:Parameter>
<asp:Parameter Type="String" Name="PHONE"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
239
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="STORE_TYPE"></asp:Parameter>
<asp:Parameter Type="String" Name="BLOCK_NO"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"></asp:Parameter>
</InsertParameters>
<UpdateParameters>
<asp:Parameter Type="String" Name="STORE_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_EMP"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_MALL"></asp:Parameter>
<asp:Parameter Type="String" Name="STORE_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="CITY_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="FLOOR"></asp:Parameter>
<asp:Parameter Type="String" Name="BLOCK_STORE"></asp:Parameter>
<asp:Parameter Type="String" Name="PHONE"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="STORE_TYPE"></asp:Parameter>
<asp:Parameter Type="String" Name="BLOCK_NO"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_STORE_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_EMP"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_MALL"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_STORE_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_CITY_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_FLOOR"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_BLOCK_STORE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_PHONE"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_STORE_TYPE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_BLOCK_NO"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ADDRESS"></asp:Parameter>
240
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_STORE_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_EMP"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_MALL"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_STORE_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_CITY_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_FLOOR"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_BLOCK_STORE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_PHONE"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_STORE_TYPE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_BLOCK_NO"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ADDRESS"></asp:Parameter>
</DeleteParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_parameter_value"
SelectCommand="SELECT "ID" as "STORE_TYPE",
"PARAMETER_VALUE" FROM "GNRL_PARAMETER_VALUE"
WHERE ("PAR_ID" = :PAR_ID)" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"><SelectParameters>
<asp:Parameter Type="Decimal" DefaultValue="6"
Name="PAR_ID"></asp:Parameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_emp"
SelectCommand="SELECT "ID", "EMP_NAME",
"EMP_CODE", "ID_USER", "SEX",
"MOBILE_NO", "ADDRESS", "COMP_ID"
FROM "EMP_STORE" ORDER BY "EMP_NAME" ASC"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
241
<asp:SqlDataSource runat="server" ID="table_mall"
SelectCommand="SELECT "ID", "PROV_ID",
"MALL_NAME", "ADDRESS", "CITY_ID",
"TELP_NO", "INACTIVE" FROM
"GNRL_REF_MALL" WHERE ("INACTIVE" = :INACTIVE)
ORDER BY "MALL_NAME"" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"><SelectParameters>
<asp:Parameter Type="String" DefaultValue="N"
Name="INACTIVE"></asp:Parameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="SqlDataSource1"
SelectCommand="SELECT "ID", "Store Code" AS
Store_Code, "Store name" AS Store_name,
"City", "Province", "Address",
"No", "Block", "Floor",
"Phone", "Store Type" AS Store_Type,
"Owner Name" AS Owner_Name, "Register Date" AS
Register_Date FROM "OWNER_STORE_VIEW" ORDER BY
"Register Date"" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="table_prov"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" SelectCommand="SELECT "PROV_NAME", "ID" as
"PROV_ID" FROM "GNRL_REF_PROVINCE" WHERE
"INACTIVE" = 'N' ORDER BY
"PROV_NAME""></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="table_city"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" SelectCommand="SELECT "ID" as "CITY_ID",
"PROV_ID", "CITY_CODE", "CITY_NAME",
"INACTIVE", "REGION_ID",
"POSTAL_CODE" FROM "GNRL_REF_CITY" WHERE
(("PROV_ID" = :combo_prov) AND ("INACTIVE" =
:INACTIVE)) ORDER BY "CITY_NAME"">
<SelectParameters>
<asp:ControlParameter ControlID="combo_prov"
Name="combo_prov" PropertyName="SelectedValue" />
<asp:Parameter DefaultValue="N" Name="INACTIVE" />
</SelectParameters>
</asp:SqlDataSource>
</TD></TR></TBODY></TABLE></dx:PanelContent>
</panelcollection>
<noheadertopedge backcolor="#EBF2F4">
</noheadertopedge>
<Content>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpContentBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</Content>
</dx:ASPxRoundPanel><br />
242
</div>
</form>
 
</asp:Content>
EditRegistrasiToko.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CJM.Database.Oracle;
using System.Data.OracleClient;
using CJM.Reference;
using CJM.Project.LGE;
using System.Drawing;
using DevExpress.Web.ASPxEditors;
//using DevExpress.Web.ASPxEditors;
public partial class AppModules_RegToko : System.Web.UI.Page
{
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = buzdomain.com)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =blitz.buzdomain.com))); User
Id=buzapps; password=qwerty007;";
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = blitz.co.id)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =buzdev))); User Id=buzapps;
password=qwerty007;";
string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =xronosit))); User
Id=buzapps; password=qwerty007;";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string idmenu = "5";
string iduser = Session["SESS_USER_ID"].ToString();
string batasan = RefDB.editVal(iduser, idmenu);
string edit = Convert.ToString(Request["id_edit"]);
string delete =
Convert.ToString(Request["id_delete"]);
if (Session["SESS_USER_ID"] == null)
{
Response.Redirect("../LogOut.aspx");
}
243
//============================= cek caption
=================
if (Session["SESS_LANG"] == "english")
{
Caption1.Text = "Owner";
Caption2.Text = "Store Name";
Caption3.Text = "Type";
Caption4.Text = "Mall";
Caption5.Text = "Province";
Caption6.Text = "City";
Caption7.Text = "Address";
Caption8.Text = "Floor";
Caption9.Text = "Block";
Caption10.Text = "No";
Caption11.Text = "Phone";
CaptionUtama.Text = "Store Registration";
Caption12.Text = "Register Date";
}
if (Session["SESS_LANG"] == "indonesia")
{
Caption1.Text = "Nama Pemilik";
Caption2.Text = "Nama Toko";
Caption3.Text = "Tipe";
Caption4.Text = "Mall";
Caption5.Text = "Propinsi";
Caption6.Text = "Kota";
Caption7.Text = "Alamat";
Caption8.Text = "Lantai";
Caption9.Text = "Block";
Caption10.Text = "No";
Caption11.Text = "Telephon";
CaptionUtama.Text = "Store Registration";
Caption12.Text = "Tgl. Registrasi";
}
if (batasan == "Y")
{
if ((edit != null)&&(delete == null))
{
combo_prov.Items.Insert(0, new ListItem("-chose --", " "));
combo_city.Items.Insert(0, new ListItem("-chose --", " "));
OracleConnection conn = new
OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
string query = " SELECT a.ID_MALL,
a.STORE_NAME, a.PROV_ID, a.CITY_ID, "+
"a.FLOOR,
a.BLOCK_STORE, a.PHONE, a.STORE_TYPE, a.STORE_SEGMENT, a.BLOCK_NO,
a.ADDRESS, a.REGISTER_DATE, b.ID, b.EMP_NAME" +
244
" FROM GNRL_REF_STORE a,
EMP_STORE b WHERE a.ID ='" + edit + "' AND a.ID_EMP = b.ID";
OracleCommand cmd = new
OracleCommand(query, conn);
OracleDataReader ds =
cmd.ExecuteReader();
if (ds.HasRows == false)
{
throw new Exception();
}
if (ds.Read())
{
combo_prov.SelectedValue =
ds["PROV_ID"].ToString();
combo_city.SelectedValue =
ds["CITY_ID"].ToString();
STORE_NAME.Text =
ds["STORE_NAME"].ToString();
FLOOR.Text =
ds["FLOOR"].ToString();
BLOCK_STORE.Text =
ds["BLOCK_STORE"].ToString();
PHONE.Text =
ds["PHONE"].ToString();
STORE_TYPE.SelectedValue =
ds["STORE_TYPE"].ToString();
BLOCK_NO.Text =
ds["BLOCK_NO"].ToString();
ADDRESS.Text =
ds["ADDRESS"].ToString();
Reg_date.Value =
ForNET.DateFromDB(ds["REGISTER_DATE"].ToString());
sReg_date.Text =
ForNET.DateFromDB(ds["REGISTER_DATE"].ToString());
ID_MALL.SelectedValue =
ds["ID_MALL"].ToString();
iID_EMP.SelectedValue =
ds["ID"].ToString();
idedit.Text = edit.ToString();
//ID_EMP.Items.Insert(0, new
ListEditItem(ds["EMP_NAME"].ToString(), ds["ID_EMP"].ToString()));
}
}
catch (Exception)
{
}
finally
{
conn.Dispose();
}
}
245
if ((edit == null) && (delete != null))
{
string QUERYDELETE = "DELETE GNRL_REF_STORE
WHERE ID = '" + delete + "'";
bool SUKSESDELETE =
ConnOracle.ExecNonQueryConnOra(QUERYDELETE);
if ((delete != "") && (SUKSESDELETE))
{
ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Delete Store Success'); window.location.href =
'RegistrasiToko.aspx';", true);
}
else
{
ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp",
"alert('Delete Store Failed'); window.location.href =
'RegistrasiToko.aspx';", true);
}
}
}
else
{
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "alert('Maaf pada halaman ini anda tidak memiliki
akses Update'); window.location.href = 'RegistrasiToko.aspx';",
true);
//Alert.Show("Maaf pada halaman ini anda tidak
memiliki akses Update");
}
}
}
protected void ID_MALL_SelectedIndexChanged(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string xID_MALL = ID_MALL.SelectedValue.ToString();
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
246
string query = " select a.MALL_NAME, a.PROV_ID,
a.CITY_ID, a.ADDRESS, b.PROV_NAME, c.CITY_NAME" +
" from GNRL_REF_MALL a,
GNRL_REF_PROVINCE b, GNRL_REF_CITY c" +
" where " +
"a.ID='" + xID_MALL + "' and a.PROV_ID
= b.ID and a.CITY_ID = c.ID";
OracleCommand cmd = new OracleCommand(query, conn);
OracleDataReader dd = cmd.ExecuteReader();
if (dd.HasRows == false)
{
throw new Exception();
}
if (dd.Read())
{
if (dd["MALL_NAME"].ToString() != "ROAD AREA")
{
combo_city.Visible = false;
combo_city.Enabled = false;
combo_prov.Visible = false;
combo_prov.Enabled = false;
//PROV_ID.Enabled = true;
//CITY_ID.Enabled = true;
//PROV_ID.Visible = true;
//CITY_ID.Visible = true;
ADDRESS.Enabled = false;
ADDRESS.ReadOnly = true;
TextBox1.Enabled
TextBox2.Enabled
TextBox1.Visible
TextBox2.Visible
=
=
=
=
true;
true;
true;
true;
ASPxButton3.Visible = true;
ASPxButton2.Visible = false;
PROV_ID.Text = dd["PROV_ID"].ToString();
CITY_ID.Text = dd["CITY_ID"].ToString();
TextBox1.Text = dd["PROV_NAME"].ToString();
TextBox2.Text = dd["CITY_NAME"].ToString();
ADDRESS.Text = dd["ADDRESS"].ToString();
}
if (dd["MALL_NAME"].ToString() == "ROAD AREA")
{
//PROV_ID.Enabled = false;
//CITY_ID.Enabled = false;
//PROV_ID.Visible = false;
//CITY_ID.Visible = false;
ADDRESS.Enabled = true;
ADDRESS.ReadOnly = false;
TextBox1.Enabled = false;
TextBox2.Enabled = false;
247
TextBox1.Visible = false;
TextBox2.Visible = false;
combo_city.Visible
combo_city.Enabled
combo_prov.Visible
combo_prov.Enabled
=
=
=
=
true;
true;
true;
true;
ASPxButton3.Visible = false;
ASPxButton2.Visible = true;
}
dd.Dispose();
cmd.Dispose();
}
}
catch (Exception)
{
}
finally
{
conn.Dispose();
}
}
protected void combo_prov_SelectedIndexChanged1(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
}
//=========== event Cancel
protected void ASPxButton1_Click(object sender, EventArgs e)
{
Response.Redirect("RegistrasiToko.aspx");
}
//=========== event edit when MALL != ROAD AREA
protected void ASPxButton3_Click(object sender, EventArgs e)
{
string edits = idedit.Text;
string sPROV_ID = PROV_ID.Text;
string sCITY_ID = CITY_ID.Text;
string oSTORE_NAME = STORE_NAME.Text;
string oFLOOR = FLOOR.Text;
string oBLOCK_STORE = BLOCK_STORE.Text;
string oPHONE = PHONE.Text;
string oSTORE_TYPE = STORE_TYPE.SelectedItem.Value;
string oBLOCK_NO = BLOCK_NO.Text;
string oADDRESS = ADDRESS.Text;
//=========== setting variable tanggal Register
248
string oDATE_REG = Reg_date.Text;
if (oDATE_REG != "")
{
oDATE_REG = ForNET.DateToDB(oDATE_REG.ToString());
}
if (oDATE_REG == "")
{
oDATE_REG = ForNET.DateToDB(sReg_date.Text);
}
//---------------------------------------------------------------------//INSERT KE TABLE GNRL_REF_STORE dengan kondisi MALL !=
ROAD AREA
//----------------------------------------------------------------------string updatestorex = "UPDATE GNRL_REF_STORE SET " +
"ID_EMP = '" + iID_EMP.SelectedItem.Value
+ "'," +
"ID_MALL= '" + ID_MALL.SelectedItem.Value
+ "'," +
"STORE_NAME= '" + oSTORE_NAME + "'," +
"PROV_ID= '" + sPROV_ID + "'," +
"CITY_ID= '" + sCITY_ID + "'," +
"FLOOR= '" + oFLOOR + "'," +
"BLOCK_STORE= '" + oBLOCK_STORE + "'," +
"PHONE= '" + oPHONE + "'," +
"UPDATE_BY= '" + Session["SESS_USER_ID"]
+ "'," +
"COMP_ID= '" + Session["SESS_COMP_ID"] +
"'," +
"STORE_TYPE= '" + oSTORE_TYPE + "'," +
"BLOCK_NO= '" + oBLOCK_NO + "'," +
"ADDRESS= '" + oADDRESS + "'," +
"REGISTER_DATE= " + oDATE_REG + "" +
" WHERE ID = " + edits + "";
bool suksesupdatestorex =
ConnOracle.ExecNonQueryConnOra(updatestorex);
if (suksesupdatestorex)
{
//STORE_NAME.Text = "";
//FLOOR.Text = "";
//BLOCK_STORE.Text = "";
//PHONE.Text = "";
//STORE_TYPE.SelectedItem.Text = "";
//BLOCK_NO.Text = "";
//ADDRESS.Text = "";
//combo_city.SelectedItem.Text = "";
//combo_prov.SelectedItem.Text = "";
//Reg_date.Text = "";
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "MessagePopUp", "alert('Update Success');
window.location.href = 'RegistrasiToko.aspx';", true);
249
//ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Success.')\", 0);", true);
}
else
{
//STORE_NAME.Text = "";
//FLOOR.Text = "";
//BLOCK_STORE.Text = "";
//PHONE.Text = "";
//STORE_TYPE.SelectedItem.Text = "";
//BLOCK_NO.Text = "";
//ADDRESS.Text = "";
//combo_city.SelectedItem.Text = "";
//combo_prov.SelectedItem.Text = "";
//Reg_date.Text = "";
//ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed.')\", 0);", true);
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "MessagePopUp", "alert('Update Failed');
window.location.href = 'RegistrasiToko.aspx';", true);
}
}
//=========== event edit when MALL == ROAD AREA
protected void ASPxButton2_Click(object sender, EventArgs e)
{
string sPROV_ID = combo_prov.SelectedValue.ToString();
string sCITY_ID = combo_city.SelectedValue.ToString();
string oSTORE_NAME = STORE_NAME.Text;
string oFLOOR = FLOOR.Text;
string oBLOCK_STORE = BLOCK_STORE.Text;
string oPHONE = PHONE.Text;
string oSTORE_TYPE = STORE_TYPE.SelectedItem.Value;
string oBLOCK_NO = BLOCK_NO.Text;
string oADDRESS = ADDRESS.Text;
//=========== setting variable tanggal Register
string oDATE_REG = Reg_date.Text;
if (oDATE_REG != "")
{
oDATE_REG = ForNET.DateToDB(oDATE_REG.ToString());
}
if (oDATE_REG == "")
{
oDATE_REG = ForNET.DateToDB(sReg_date.Text);
}
string editx = idedit.Text;
string idemp = iID_EMP.SelectedValue.ToString();
string idmall = ID_MALL.SelectedValue.ToString();
250
//---------------------------------------------------------------------//INSERT KE TABLE GNRL_REF_STORE dengan kondisi MALL ==
ROAD AREA
//----------------------------------------------------------------------string UpdateStore = "UPDATE GNRL_REF_STORE SET " +
"ID_EMP = '" + idemp + "', " +
"ID_MALL= '" + idmall + "', " +
"STORE_NAME= '" + oSTORE_NAME + "', "
+
"PROV_ID= '" + sPROV_ID + "', " +
"CITY_ID= '" + sCITY_ID + "', " +
"FLOOR= '" + oFLOOR + "', " +
"BLOCK_STORE= '" + oBLOCK_STORE + "',
" +
"PHONE= '" + oPHONE + "', " +
"UPDATE_BY= '" +
Session["SESS_USER_ID"] + "', " +
"COMP_ID= '" +
Session["SESS_COMP_ID"] + "', " +
"STORE_TYPE= '" + oSTORE_TYPE + "', "
+
"BLOCK_NO= '" + oBLOCK_NO + "', " +
"ADDRESS= '" + oADDRESS + "', " +
"REGISTER_DATE= " + oDATE_REG + " " +
" WHERE ID = '" + editx + "'";
bool suksesUpdate =
ConnOracle.ExecNonQueryConnOra(UpdateStore);
if (suksesUpdate)
{
//STORE_NAME.Text = "";
//FLOOR.Text = "";
//BLOCK_STORE.Text = "";
//PHONE.Text = "";
//STORE_TYPE.SelectedItem.Text = "";
//BLOCK_NO.Text = "";
//ADDRESS.Text = "";
//combo_city.SelectedItem.Value = "";
//combo_prov.SelectedItem.Value = "";
//Reg_date.Text = "";
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "MessagePopUp", "alert('Update Success');
window.location.href = 'RegistrasiToko.aspx';", true);
//"validationAlert",
"window.setTimeout(\"alert('Update Success.')\", 0);"
}
else
{
//STORE_NAME.Text = "";
//FLOOR.Text = "";
//BLOCK_STORE.Text = "";
//PHONE.Text = "";
//STORE_TYPE.SelectedItem.Text = "";
251
//BLOCK_NO.Text = "";
//ADDRESS.Text = "";
//combo_city.SelectedValue = "";
//combo_prov.SelectedValue = "";
//Reg_date.Text = "";
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "MessagePopUp", "alert('Update Failed');
window.location.href = 'RegistrasiToko.aspx';", true);
//ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Update Failed.')\", 0);", true);
}
}
}
ImeiWarrant.aspx
<%--<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="RegistrasiOwner.aspx.cs" Inherits="AppModules_Default2"
%>
--%>
<%@ Page Language="C#" MasterPageFile="MasterPage.master"
AutoEventWireup="true" CodeFile="ImeiWarrant.aspx.cs"
Inherits="AppModules_Default2" Title="Sales Management System"
EnableEventValidation ="false" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxUploadControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
<div style="text-align: left">
<dx:ASPxRoundPanel ID="ASPxRoundPanel2" runat="server"
BackColor="#EBF2F4"
CssFilePath="~/App_Themes/Glass/{0}/styles.css"
252
CssPostfix="Glass" HeaderText="Warrant Card
Collection" SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css"
Width="200px">
<LeftEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</LeftEdge>
<HeaderContent>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</HeaderContent>
<ContentPaddings PaddingBottom="10px"
PaddingLeft="4px" PaddingTop="10px" />
<RightEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</RightEdge>
<HeaderRightEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderRightEdge.gif"
VerticalPosition="bottom" />
</HeaderRightEdge>
<Border BorderColor="#7EACB1" BorderStyle="Solid"
BorderWidth="1px" />
<HeaderStyle BackColor="White" Height="23px">
<BorderBottom BorderStyle="None" />
<Paddings PaddingBottom="0px" PaddingLeft="2px"
PaddingTop="0px" />
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderLeftEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</HeaderLeftEdge>
<BottomEdge BackColor="#D7E9F1">
</BottomEdge>
<PanelCollection>
<dx:PanelContent runat="server">
<asp:ScriptManager id="ScriptManager1"
runat="server">
</asp:ScriptManager>
<asp:Label ID="CaptionUtama" runat="server"
Width="450px" BackColor="White" Font-Size="Large"
ForeColor="SteelBlue" Visible="False"></asp:Label>
<table width="900">
<tr>
<td style="width: 470px; height: 18px"
valign="top">
<asp:UpdatePanel
id="UpdatePanel17" runat="server">
<contenttemplate>
253
<dx:ASPxRoundPanel id="ASPxRoundPanel5" runat="server"
Width="400px" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
BackColor="White" __designer:wfdid="w157">
<TopEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif"></BackgroundImage>
</TopEdge>
<LeftEdge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif"></BackgroundImage>
</LeftEdge>
<HeaderContent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderContent>
<ContentPaddings Padding="14px"></ContentPaddings>
<RightEdge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif"></BackgroundImage
>
</RightEdge>
<HeaderRightEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderRightEdge>
<Border BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></Border>
<HeaderStyle BackColor="#E0EDFF">
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></BorderBottom>
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderLeftEdge>
<BottomEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Bottom"
ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif"></BackgroundImag
e>
</BottomEdge>
<PanelCollection>
<dx:PanelContent runat="server"><TABLE width="100%"><TBODY><TR><TD
style="WIDTH: 166px" vAlign=top><asp:Label runat="server"
Width="163px" ID="Label1a" __designer:wfdid="w65">Input
By</asp:Label>
254
</TD><TD style="WIDTH: 8px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel16"
__designer:wfdid="w66"><ContentTemplate>
<dx:ASPxComboBox id="ASPxComboBox1" runat="server"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w67" SelectedIndex="0"
LoadingPanelImagePosition="Top" ValueType="System.String"
ShowShadow="False" AutoPostBack="True"
OnSelectedIndexChanged="ASPxComboBox1_SelectedIndexChanged"><Items
>
<dx:ListEditItem Value="" Text="-- Chose --"
Selected="True"></dx:ListEditItem>
<dx:ListEditItem Value="1" Text="By Schedule"></dx:ListEditItem>
<dx:ListEditItem Value="0" Text="Non Schedule"></dx:ListEditItem>
</Items>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress121"
AssociatedUpdatePanelID="UpdatePanel16"
__designer:wfdid="w68"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress121"
runat="server" Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w69"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR></TBODY></TABLE></dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="White">
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif"></Backgroun
dImage>
</NoHeaderTopEdge>
</dx:ASPxRoundPanel>
</contenttemplate>
</asp:UpdatePanel><br />
<asp:UpdatePanel
id="UpdatePanel18" runat="server">
255
<contenttemplate>
<dx:ASPxRoundPanel id="ASPxRoundPanel3" runat="server"
Width="400px" HeaderText="Input Without Schedule"
CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
Visible="False" BackColor="#E3E3EC" __designer:wfdid="w119"
EnableDefaultAppearance="False">
<TopEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Silver/Web/rpTopEdge.png"></Backg
roundImage>
</TopEdge>
<HeaderContent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Silver/Web/rpHeader.png"></Backgr
oundImage>
</HeaderContent>
<ContentPaddings PaddingTop="10px" Padding="2px"
PaddingBottom="10px"></ContentPaddings>
<HeaderRightEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Silver/Web/rpHeader.png"></Backgr
oundImage>
</HeaderRightEdge>
<Border BorderWidth="1px" BorderStyle="Solid"
BorderColor="#7C7C94"></Border>
<HeaderStyle BackColor="#9593B1">
<Paddings Padding="0px" PaddingRight="2px" PaddingBottom="7px"
PaddingLeft="2px"></Paddings>
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#7C7C94"></BorderBottom>
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Silver/Web/rpHeader.png"></Backgr
oundImage>
</HeaderLeftEdge>
<DisabledStyle ForeColor="Gray"></DisabledStyle>
<PanelCollection>
<dx:PanelContent runat="server"><TABLE width="100%"><TBODY><TR><TD
style="WIDTH: 136px" vAlign=top><asp:Label runat="server"
Text="Date" Width="150px" ID="Label2"
__designer:wfdid="w72"></asp:Label>
</TD><TD style="WIDTH: 9px" vAlign=top>:</TD><TD
vAlign=top><dx:ASPxDateEdit runat="server"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
256
CssPostfix="Office2003Silver" ID="visit_nosch"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
__designer:wfdid="w73">
<ButtonStyle Width="13px"></ButtonStyle>
</dx:ASPxDateEdit>
</TD></TR><TR><TD style="WIDTH: 136px" vAlign=top>Mall</TD><TD
style="WIDTH: 9px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel12"
__designer:wfdid="w74"><ContentTemplate>
<dx:ASPxComboBox id="mall_nosch" runat="server"
CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
__designer:wfdid="w75" ValueType="System.String"
AutoPostBack="True"
OnSelectedIndexChanged="ASPxComboBox2_SelectedIndexChanged"
EnableIncrementalFiltering="True">
<ButtonStyle Width="13px"></ButtonStyle>
<LoadingPanelImage
Url="~/App_Themes/Office2003Silver/Web/Loading.gif"></LoadingPanel
Image>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress131"
AssociatedUpdatePanelID="UpdatePanel12"
__designer:wfdid="w76"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress131"
runat="server" Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w77"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR><TD style="WIDTH: 136px" vAlign=top><asp:Label
runat="server" Text="Store" Width="148px" ID="Label3"
__designer:wfdid="w78"></asp:Label>
</TD><TD style="WIDTH: 9px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel20"
__designer:wfdid="w79"><ContentTemplate>
<dx:ASPxComboBox id="store_nosch" runat="server"
CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
__designer:wfdid="w80" ValueType="System.String"
AutoPostBack="True"
OnSelectedIndexChanged="store_nosch_SelectedIndexChanged"
EnableIncrementalFiltering="True">
<LoadingPanelImage
Url="~/App_Themes/Office2003Silver/Web/Loading.gif"></LoadingPanel
Image>
<ButtonStyle Width="13px"></ButtonStyle>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress124"
AssociatedUpdatePanelID="UpdatePanel20"
__designer:wfdid="w81"><ProgressTemplate>
257
<DIV class="progress"><asp:Image id="imgProgress124"
runat="server" Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w82"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR><TD style="WIDTH: 136px" vAlign=top><asp:Label
runat="server" Text="Mobile Promotor" Width="147px" ID="Label7"
__designer:wfdid="w83"></asp:Label>
</TD><TD style="WIDTH: 9px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel21"
__designer:wfdid="w84"><ContentTemplate>
<dx:ASPxComboBox id="mp_nosch" runat="server"
CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
__designer:wfdid="w85" ValueType="System.String"
EnableIncrementalFiltering="True">
<ButtonStyle Width="13px"></ButtonStyle>
<LoadingPanelImage
Url="~/App_Themes/Office2003Silver/Web/Loading.gif"></LoadingPanel
Image>
</dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel>
  </TD></TR></TBODY></TABLE></dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="#E3E3EC"></NoHeaderTopEdge>
</dx:ASPxRoundPanel>
</contenttemplate>
</asp:UpdatePanel>
<asp:UpdatePanel
id="UpdatePanel19" runat="server">
<contenttemplate>
<dx:ASPxRoundPanel id="ASPxRoundPanel4" runat="server"
Width="400px" HeaderText="Input with Schedule"
CssPostfix="Office2003Olive"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
Visible="False" BackColor="#E2E8C9" __designer:wfdid="w128"
EnableDefaultAppearance="False">
<TopEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Olive/Web/rpTopEdge.png"></Backgr
oundImage>
</TopEdge>
<HeaderContent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Olive/Web/rpHeader.png"></Backgro
undImage>
</HeaderContent>
<ContentPaddings PaddingTop="10px" Padding="2px"
PaddingBottom="10px"></ContentPaddings>
258
<HeaderRightEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Olive/Web/rpHeader.png"></Backgro
undImage>
</HeaderRightEdge>
<Border BorderWidth="1px" BorderStyle="Solid"
BorderColor="#758D5E"></Border>
<HeaderStyle BackColor="#B5C48F">
<Paddings Padding="0px" PaddingRight="2px" PaddingBottom="7px"
PaddingLeft="2px"></Paddings>
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#758D5E"></BorderBottom>
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="top"
HorizontalPosition="left"
ImageUrl="~/App_Themes/Office2003Olive/Web/rpHeader.png"></Backgro
undImage>
</HeaderLeftEdge>
<DisabledStyle ForeColor="Gray"></DisabledStyle>
<PanelCollection>
<dx:PanelContent runat="server"><TABLE width="100%"><TBODY><TR><TD
style="WIDTH: 168px" vAlign=top><asp:Label runat="server"
Width="163px" ID="Caption1"
__designer:wfdid="w88">Schedule</asp:Label>
</TD><TD style="WIDTH: 3px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel1"
__designer:wfdid="w89"><ContentTemplate>
<dx:ASPxComboBox id="visit_date" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w90" LoadingPanelImagePosition="Top"
ValueType="System.String" ShowShadow="False" AutoPostBack="True"
OnSelectedIndexChanged="visit_date_SelectedIndexChanged">
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
259
</dx:ASPxComboBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator1" runat="server" Width="181px"
__designer:wfdid="w91" ControlToValidate="visit_date"
ErrorMessage="Tanggal harus diisi"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress1"
AssociatedUpdatePanelID="UpdatePanel1"
__designer:wfdid="w92"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress1" runat="server"
Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w93"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR><TD style="WIDTH: 168px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption2"
__designer:wfdid="w94">Store</asp:Label>
</TD><TD style="WIDTH: 3px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel11"
__designer:wfdid="w95"><ContentTemplate>
<dx:ASPxComboBox id="toko_kunjungan" runat="server"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w96" LoadingPanelImagePosition="Top"
ValueType="System.String" ShowShadow="False" AutoPostBack="True"
OnSelectedIndexChanged="toko_kunjungan_SelectedIndexChanged">
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator1a" runat="server" Width="181px"
__designer:wfdid="w97" ControlToValidate="visit_date"
ErrorMessage="Toko harus diisi"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress122"
AssociatedUpdatePanelID="UpdatePanel11"
__designer:wfdid="w98"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress122"
runat="server" Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w99"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
260
</TD></TR><TR><TD style="WIDTH: 168px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption3"
__designer:wfdid="w100">Mobile Promotor</asp:Label>
</TD><TD style="WIDTH: 3px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel2"
__designer:wfdid="w101"><ContentTemplate>
<dx:ASPxComboBox id="Prom_id" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w102" LoadingPanelImagePosition="Top"
ValueType="System.String" ShowShadow="False"
EnableIncrementalFiltering="True">
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator2" runat="server" Width="184px"
__designer:wfdid="w103" ControlToValidate="Prom_id"
ErrorMessage="Mobile promotor harus
diisi"></asp:RequiredFieldValidator> 
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 168px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption4"
__designer:wfdid="w104">Authorize</asp:Label>
</TD><TD style="WIDTH: 3px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel3"
__designer:wfdid="w105"><ContentTemplate>
<dx:ASPxTextBox id="aut_id" runat="server" Width="170px"
Visible="False" __designer:wfdid="w106"></dx:ASPxTextBox>
<dx:ASPxTextBox id="aut_id2" runat="server" Width="170px"
__designer:wfdid="w107"></dx:ASPxTextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR></TBODY></TABLE></dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="#E2E8C9"></NoHeaderTopEdge>
</dx:ASPxRoundPanel>
</contenttemplate>
</asp:UpdatePanel></td>
<td style="height: 18px; width: 3px;"
valign="top">
</td>
<td rowspan="1" valign="top">
261
<asp:UpdatePanel
id="UpdatePanel9" runat="server">
<contenttemplate>
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
Width="100%" HeaderText="Detail Input" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
Visible="False" BackColor="White" __designer:wfdid="w199">
<TopEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif"></BackgroundImage>
</TopEdge>
<LeftEdge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif"></BackgroundImage>
</LeftEdge>
<HeaderContent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderContent>
<ContentPaddings Padding="14px"></ContentPaddings>
<RightEdge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif"></BackgroundImage
>
</RightEdge>
<HeaderRightEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderRightEdge>
<Border BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></Border>
<HeaderStyle BackColor="#E0EDFF">
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></BorderBottom>
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderLeftEdge>
<BottomEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Bottom"
ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif"></BackgroundImag
e>
</BottomEdge>
<PanelCollection>
262
<dx:PanelContent runat="server"><TABLE width="100%"><TBODY><TR><TD
style="WIDTH: 220px" vAlign=top><asp:Label runat="server"
Width="163px" ID="Caption5"
__designer:wfdid="w110">Frontliner</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel4"
__designer:wfdid="w111"><ContentTemplate>
<dx:ASPxComboBox id="front_id" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w112" LoadingPanelImagePosition="Top"
ValueType="System.String" ShowShadow="False"
EnableIncrementalFiltering="True">
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator3" runat="server" Width="190px"
__designer:wfdid="w113" ControlToValidate="front_id"
ErrorMessage="Frontliner harus
diisi"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption8"
__designer:wfdid="w114">Product No.</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel5"
__designer:wfdid="w115"><ContentTemplate>
<dx:ASPxTextBox id="imei" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
BackColor="PaleTurquoise" __designer:wfdid="w116"
AutoPostBack="True" OnTextChanged="imei_TextChanged">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox><asp:RequiredFieldValidator
id="RequiredFieldValidator4" runat="server" Width="194px"
__designer:wfdid="w117" ControlToValidate="imei"
ErrorMessage="Product No can't be
null"></asp:RequiredFieldValidator>
</ContentTemplate>
263
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress235"
AssociatedUpdatePanelID="UpdatePanel5"
__designer:wfdid="w118"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress235"
runat="server" Width="150px" ImageUrl="~/images/wait.gif"
__designer:wfdid="w119"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:Label runat="server" Font-Size="Medium" Font-Bold="True"
Width="211px" ForeColor="Green" ID="Label5"
__designer:wfdid="w120"></asp:Label>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption6"
__designer:wfdid="w121">Product Type</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel6"
__designer:wfdid="w122"><ContentTemplate>
<dx:ASPxTextBox id="prod_type" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w123" ReadOnly="True">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<ReadOnlyStyle BackColor="#E0E0E0"></ReadOnlyStyle>
</dx:ASPxTextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px"
vAlign=top> <asp:Label runat="server" Width="163px"
ID="Caption7" __designer:wfdid="w124">Product Model</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel10"
__designer:wfdid="w125"><ContentTemplate>
<dx:ASPxTextBox id="prod_mod2" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w126" AutoPostBack="True" ReadOnly="True">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<ReadOnlyStyle BackColor="#E0E0E0"></ReadOnlyStyle>
</dx:ASPxTextBox> <dx:ASPxTextBox id="prod_mod" runat="server"
Width="170px" Visible="False"
__designer:wfdid="w127"></dx:ASPxTextBox>
</ContentTemplate>
</asp:UpdatePanel>
 </TD></TR><TR><TD style="WIDTH: 220px"
vAlign=top><asp:Label runat="server" Width="163px" ID="Caption9"
__designer:wfdid="w128">Customer Name</asp:Label>
264
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel7"
__designer:wfdid="w129"><ContentTemplate>
<dx:ASPxTextBox id="cust_name" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w130">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator7" runat="server" Width="194px"
__designer:wfdid="w131" ControlToValidate="cust_name"
ErrorMessage="Customer Name can't be
null"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Caption10"
__designer:wfdid="w132">Phone</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel8"
__designer:wfdid="w133"><ContentTemplate>
<dx:ASPxTextBox id="cust_phone" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w134">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator8" runat="server"
__designer:wfdid="w135" ControlToValidate="cust_phone"
ErrorMessage="Phone No can't be
null"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 220px" vAlign=top><asp:Label
runat="server" Width="163px" ID="Label4"
__designer:wfdid="w136">Email</asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD
vAlign=top><asp:UpdatePanel runat="server" ID="UpdatePanel13"
__designer:wfdid="w137"><ContentTemplate>
<dx:ASPxTextBox id="email" runat="server" Width="170px"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:wfdid="w138">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxTextBox>
</ContentTemplate>
</asp:UpdatePanel>
265
</TD></TR></TBODY></TABLE></dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="White">
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif"></Backgroun
dImage>
</NoHeaderTopEdge>
</dx:ASPxRoundPanel>
</contenttemplate>
</asp:UpdatePanel>
</td>
</tr>
<tr>
<td style="width: 470px"
valign="top">
<asp:UpdatePanel
id="UpdatePanel14" runat="server">
<contenttemplate>
  <TABLE width=200><TBODY><TR><TD style="HEIGHT:
43px"><dx:ASPxButton id="save_schedule" runat="server"
Width="80px" CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
Visible="False" __designer:wfdid="w163" Text="Save"
OnClick="save_schedule_Click"></dx:ASPxButton></TD><TD
style="HEIGHT: 43px"><dx:ASPxButton id="save_nonschedule"
runat="server" Width="80px" CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
Visible="False" __designer:wfdid="w164" Text="Save"
OnClick="save_nonschedule_Click"></dx:ASPxButton></TD><TD
style="HEIGHT: 43px"><dx:ASPxButton id="ASPxButton3"
onclick="ASPxButton3_Click" runat="server" Width="80px"
CssPostfix="Office2003Silver"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
Visible="False" __designer:wfdid="w162" Text="Cancel"
CausesValidation="False"></dx:ASPxButton></TD></TR><TR><TD></TD><T
D></TD><TD></TD></TR><TR><TD></TD><TD></TD><TD></TD></TR></TBODY><
/TABLE>   
</contenttemplate>
</asp:UpdatePanel></td>
<td valign="top" style="width: 3px">
</td>
<td valign="top">
<asp:SqlDataSource ID="table_prom" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_auth" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_front" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" ></asp:SqlDataSource>
266
<asp:SqlDataSource ID="table_prod" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_grid" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_toko" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" ></asp:SqlDataSource>
<asp:SqlDataSource ID="table_prod_type"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand='SELECT "ID", "GROUP_NAME",
"COMP_ID" FROM "REF_PRODUCT_GROUP" ORDER BY
"GROUP_NAME"'>
</asp:SqlDataSource>
<asp:SqlDataSource ID="table_gridUtama"
runat="server" ConnectionString="<%$
ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand='SELECT "ID", "FL_ID",
"SALES_ID", "PRODUCT_ID",
"PRODUCT_NO", "COLLECT_DATE",
"COMP_ID", "SALES_AUTHORIZE" FROM
"DAILY_COLLECT_KG" ORDER BY "INPUT_DATE"
DESC'>
</asp:SqlDataSource>
<asp:SqlDataSource ID="table_sched" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" >
</asp:SqlDataSource>
<asp:SqlDataSource ID="tb_store" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" >
</asp:SqlDataSource>
<asp:SqlDataSource ID="tb_mp" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" >
</asp:SqlDataSource>
<asp:SqlDataSource ID="tb_auth" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" >
</asp:SqlDataSource>
<asp:SqlDataSource ID="tb_mall" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" >
</asp:SqlDataSource>
267
</td>
</tr>
<tr>
<td colspan="3" valign="top">
<hr color="#006fae" style="width: 101%" />
 </td>
</tr>
<tr>
<td colspan="3" valign="top">
<asp:UpdatePanel id="UpdatePanel15"
runat="server">
<contenttemplate>
<dx:ASPxGridView id="ASPxGridView1" runat="server" Visible="False"
__designer:wfdid="w157" OnRowDeleting="ASPxGridView1_RowDeleting"
OnRowUpdating="ASPxGridView1_RowUpdating" KeyFieldName="ID"
AutoGenerateColumns="False">
<SettingsPager Position="Top"></SettingsPager>
<Columns>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="0"><DataItemTemplate>
<a href="EditImeiWarrant.aspx?id_edit=<%#Eval ("ID")%>">Edit</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="1"><DataItemTemplate>
<a href="EditImeiWarrant.aspx?id_delete=<%#Eval
("ID")%>">Delete</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataTextColumn Visible="False" VisibleIndex="0"
FieldName="ID" Caption="ID"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2"
FieldName="COLLECT_DATE" Caption="COLLECT
DATE"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3" FieldName="MONTH"
Caption="MONTH"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4" FieldName="YEAR"
Caption="YEAR"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="5" FieldName="EMP_NAME"
Caption="MOBILE PROMOTOR"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="6" FieldName="CITY_NAME"
Caption="CITY"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="7" FieldName="PROV_NAME"
Caption="PROVINCE"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="8" FieldName="PRODUCT_NO"
Caption="PRODUCT NO"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="9"
FieldName="PRODUCT_MODEL" Caption="PRODUCT
MODEL"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="10"
FieldName="PRODUCT_NAME" Caption="PRODUCT
NAME"></dx:GridViewDataTextColumn>
</Columns>
<SettingsEditing PopupEditFormHeight="300px"
PopupEditFormHorizontalAlign="Center" PopupEditFormModal="True"
268
PopupEditFormWidth="900px" PopupEditFormVerticalAlign="Middle"
Mode="PopupEditForm"></SettingsEditing>
<Settings ShowGroupPanel="True" ShowVerticalScrollBar="True"
ShowFilterRow="True" ShowHorizontalScrollBar="True"></Settings>
</dx:ASPxGridView> <BR /><dx:ASPxButton id="ASPxButton1"
onclick="ASPxButton1_Click" runat="server" Width="100px"
CssPostfix="Office2003Olive"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
__designer:wfdid="w158" Text="Open Grid"
CausesValidation="False"></dx:ASPxButton><BR /><dx:ASPxButton
id="ASPxButton2" onclick="ASPxButton2_Click" runat="server"
Width="100px" CssPostfix="Office2003Olive"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
Visible="False" __designer:wfdid="w159" Text="Close Grid"
CausesValidation="False"></dx:ASPxButton>
</contenttemplate>
</asp:UpdatePanel></td>
</tr>
</table>
</dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="#EBF2F4">
</NoHeaderTopEdge>
<Content>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpContentBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</Content>
</dx:ASPxRoundPanel>
<!-- ======================== TABLE UTAMA
=========================== -->
<!-- ======================== BATAS AKHIR TABLE UTAMA
=========================== -->
</div>
</form>
</asp:Content>
ImeiWarrant.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//using DevExpress.Web.ASPxEditors;
269
using
using
using
using
using
CJM.Database.Oracle;
System.Data.OracleClient;
CJM.Reference;
CJM.Project.LGE;
DevExpress.Web.ASPxEditors;
public partial class AppModules_Default2 : System.Web.UI.Page
{
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = buzdomain.com)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =blitz.buzdomain.com))); User
Id=buzapps; password=qwerty007;";
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = blitz.co.id)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =buzdev))); User Id=buzapps;
password=qwerty007;";
string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =xronosit))); User
Id=buzapps; password=qwerty007;";
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_USER_ID"] == null)
{
Response.Redirect("../LogOut.aspx");
}
//============================= cek caption
=================
if (Session["SESS_LANG"] == "english")
{
Caption1.Text = "Schedule";
Caption2.Text = "Store";
Caption3.Text = "Mobile Promotor";
Caption4.Text = "Authorize";
Caption5.Text = "Frontliner";
Caption6.Text = "Product Type";
Caption7.Text = "Product Model";
Caption8.Text = "Product No.";
Caption9.Text = "Customer Name";
Caption10.Text = "Phone";
//Caption12.Text = "Owner Information";
//Caption13.Text = "Name";
//Caption14.Text = "Address";
//Caption15.Text = "Mobile No.";
CaptionUtama.Text = "Warrant Card Collecting";
}
if (Session["SESS_LANG"] == "indonesia")
{
Caption1.Text = "Jadwal";
Caption2.Text = "Toko";
Caption3.Text = "Mobile Promotor";
Caption4.Text = "Perwakilan";
Caption5.Text = "Frontliner";
Caption6.Text = "Tipe Produk";
270
Caption7.Text = "Model";
Caption8.Text = "No. Produk";
Caption9.Text = "Nama Customer";
Caption10.Text = "Telephon";
//Caption12.Text = "Informasi Pemilik";
//Caption13.Text = "Nama";
//Caption14.Text = "Alamat";
//Caption15.Text = "No. HP";
CaptionUtama.Text = "Penarikan Kartu Garansi";
}
bindDataRowFilter();
}
private void bindDataRowFilter()
{
//string query = " SELECT SUBSTR (a.collect_date, 0, 10)
collect_date, " +
//
"week
('daily_collect_kg','collect_date', collect_date) week, " +
//
"TO_CHAR (a.collect_date, 'Month')
MONTH, " +
//
"quarter
('daily_collect_kg','collect_date', collect_date) quarter, " +
//
"TO_CHAR (a.collect_date, 'yyyy')
YEAR, b.emp_name, " +
//
"c.city_name city_name,
d.prov_name prov_name, " +
//
"e.product_name product_name,
e.product_model, " +
//
"a.product_no " +
//
"FROM daily_collect_kg a, " +
//
"emp_sales_officer b, " +
//
"gnrl_ref_city c, " +
//
"gnrl_ref_province d, " +
//
"ref_product e " +
//
"WHERE a.sales_id = b.ID " +
//
"AND b.city_id = c.ID " +
//
"AND b.prov_id = d.ID " +
//
"AND a.product_id = e.ID ";
string query = " SELECT a.ID, SUBSTR (a.collect_date, 0,
10) collect_date, "+
"TO_CHAR (a.collect_date, 'Month') MONTH, "+
"TO_CHAR (a.collect_date, 'yyyy') YEAR, b.emp_name, "+
"c.city_name city_name, d.prov_name prov_name, "+
"CASE "+
"WHEN UPPER (o.model) LIKE 'M10V%' "+
"OR UPPER (o.model) LIKE '%1012%' "+
"THEN 'MINI' "+
"WHEN o.model LIKE 'I%' OR model LIKE 'IN%' "+
"THEN 'INSPIRON' "+
"WHEN o.model LIKE 'X%' "+
"THEN 'XPS' "+
"WHEN o.model LIKE 'S%' "+
"THEN 'STUDIO' "+
"WHEN o.model LIKE 'W%' "+
271
"THEN 'ALIEN WARE' "+
"WHEN o.model LIKE 'V%' "+
"THEN 'VOSTRO' "+
"WHEN o.model LIKE 'A%' "+
"THEN 'ADAMO' "+
"ELSE 'INVALID' "+
"END product_name, "+
"o.model product_model, a.product_no "+
"FROM daily_collect_kg a, "+
"emp_sales_officer b, "+
"gnrl_ref_store s, "+
"gnrl_ref_city c, "+
"gnrl_ref_province d, "+
"invent_order o, "+
"invent_prodno t "+
"WHERE a.sales_id = b.ID(+) "+
"AND a.store_id = s.ID "+
"AND c.prov_id = d.ID "+
"AND s.city_id = c.ID "+
"AND t.invent_id = o.ID(+) " +
"AND a.product_id = t.ID(+) ";
OracleDataAdapter ad = new OracleDataAdapter(query,
ConnOracle.ConnOra());
DataSet ds = new DataSet();
ad.Fill(ds);
ASPxGridView1.DataSource = ds;
ASPxGridView1.DataBind();
}
//============= event pilihan input
==========================//
protected void ASPxComboBox1_SelectedIndexChanged(object
sender, EventArgs e)
{
string pilih =
ASPxComboBox1.SelectedItem.Value.ToString();
if (pilih == "1")
{
System.Threading.Thread.Sleep(1000);
ASPxRoundPanel3.Visible = false;
ASPxRoundPanel4.Visible = true;
ASPxRoundPanel1.Visible = true;
save_schedule.Visible = true;
save_nonschedule.Visible = false;
ASPxButton3.Visible = true;
//===================== Schedule date
table_sched.SelectCommand = "SELECT DISTINCT
TO_CHAR(DATE_SCHED, 'DD/MM/YYYY') as Date_sch " +
"FROM EMP_SALES_SCHED
" +
"ORDER BY 1
DESC";
272
visit_date.DataSource = table_sched;
visit_date.TextField = "Date_sch";
visit_date.ValueField = "Date_sch";
visit_date.DataBind();
visit_date.Items.Insert(0, new ListEditItem("-- chose
--", " "));
}
else
{
ASPxRoundPanel3.Visible = true;
ASPxRoundPanel4.Visible = false;
ASPxRoundPanel1.Visible = true;
save_schedule.Visible = false;
save_nonschedule.Visible = true;
ASPxButton3.Visible = true;
//===================== Store
tb_mall.SelectCommand = "SELECT ID, MALL_NAME FROM " +
"GNRL_REF_MALL ";
mall_nosch.DataSource = tb_mall;
mall_nosch.TextField = "MALL_NAME";
mall_nosch.ValueField = "ID";
mall_nosch.DataBind();
mall_nosch.Items.Insert(0, new ListEditItem("-- chose
--", " "));
}
}
protected void imei_TextChanged(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string IMEINO = imei.Text;
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
string queryss = "SELECT COUNT(*) AS IMEI FROM
INVENT_PRODNO WHERE PROD_NO = '" + IMEINO + "'";
OracleCommand cmds = new OracleCommand(queryss, conn);
OracleDataReader drs = cmds.ExecuteReader();
if (drs.HasRows == false)
{
throw new Exception();
}
if (drs.Read())
{
try
273
{
string noid = drs["IMEI"].ToString();
if (noid == "0")
{
Label5.Text = "Your Imei Invalid";
imei.Text = "";
}
else
{
Label5.Text = "Your Imei Valid";
string querysxs = "SELECT DISTINCT class
PRODUCT " +
",CASE " +
"WHEN UPPER
(o.model) LIKE 'M10V%' " +
"OR UPPER
(o.model) LIKE '%1012%' " +
"THEN 'MINI' " +
"WHEN o.model
LIKE 'I%' OR model LIKE 'IN%' " +
"THEN
'INSPIRON' " +
"WHEN o.model
LIKE 'X%' " +
"THEN 'XPS'
" +
"WHEN o.model
LIKE 'S%' " +
"THEN
'STUDIO' " +
"WHEN o.model LIKE
'W%' " +
"THEN 'ALIEN
WARE' " +
"WHEN o.model
LIKE 'V%' " +
"THEN
'VOSTRO' " +
"WHEN o.model
LIKE 'A%' " +
"THEN
'ADAMO' " +
"ELSE 'N/A' " +
"END TYPE, MODEL,
s.ID " +
"FROM invent_prodno p "
+
",invent_order o " +
",ref_product s " +
"WHERE p.invent_id = o.id
" +
"AND o.model =
s.product_model " +
"AND p.prod_no LIKE '"
+ IMEINO + "'";
274
OracleCommand cmdsxs = new
OracleCommand(querysxs, conn);
OracleDataReader drsxs =
cmdsxs.ExecuteReader();
if (drsxs.Read())
{
prod_type.Text =
drsxs["TYPE"].ToString();
prod_mod.Text =
drsxs["ID"].ToString();
prod_mod2.Text =
drsxs["MODEL"].ToString();
}
}
drs.Dispose();
cmds.Dispose();
}
catch (Exception)
{
}
}
}
catch (Exception) { }
finally
{
conn.Dispose();
}
}
protected void ASPxGridView1_RowUpdating(object sender,
DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
{
e.Cancel = true;
Response.Redirect("EditImeiWarrant.aspx?id_edit=" +
e.Keys);
}
protected void ASPxGridView1_RowDeleting(object sender,
DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
{
e.Cancel = true;
Response.Redirect("EditImeiWarrant.aspx?id_delete=" +
e.Keys);
}
275
//================ With Schedule
============================//
protected void visit_date_SelectedIndexChanged(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string visitdate = visit_date.SelectedItem.Text;
//===================== sales toko kunjungan
table_toko.SelectCommand = "SELECT DISTINCT a.STORE_ID,
b.STORE_NAME FROM " +
"EMP_SALES_SCHED a,
GNRL_REF_STORE b " +
"WHERE a.DATE_SCHED =
'" + visitdate + "' AND a.STORE_ID = b.ID " +
"ORDER BY
b.STORE_NAME ASC";
toko_kunjungan.DataSource = table_toko;
toko_kunjungan.TextField = "STORE_NAME";
toko_kunjungan.ValueField = "STORE_ID";
toko_kunjungan.DataBind();
toko_kunjungan.Items.Insert(0, new ListEditItem("-- chose
--", " "));
}
protected void toko_kunjungan_SelectedIndexChanged(object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string visitdates = visit_date.SelectedItem.Text;
string storid =
toko_kunjungan.SelectedItem.Value.ToString();
//===================== Authorize
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
string querysx = "SELECT DISTINCT a.SALES_ID,
b.EMP_NAME FROM " +
"EMP_SALES_SCHED a,
EMP_SALES_OFFICER b " +
"WHERE a.DATE_SCHED =
'" + visitdates + "' AND a.STORE_ID = " + storid + " AND
a.SALES_ID = b.ID " +
"ORDER BY
b.EMP_NAME ASC";
OracleCommand cmdx = new OracleCommand(querysx, conn);
OracleDataReader drx = cmdx.ExecuteReader();
276
if (drx.HasRows == false)
{
throw new Exception();
}
if (drx.Read())
{
try
{
aut_id.Text = drx["SALES_ID"].ToString();
aut_id2.Text = drx["EMP_NAME"].ToString();
drx.Dispose();
cmdx.Dispose();
}
catch (Exception)
{
}
}
}
catch (Exception) { }
finally
{
conn.Dispose();
}
//================ Mobile Promotor
table_prom.SelectCommand = "select distinct w.SALES_ID,
o.EMP_NAME " +
"from emp_sales_workarea w,
emp_sales_officer o "+
"where w.sales_id = o.id "+
"and w.prov_id in (select
prov_id from gnrl_ref_store where id = " + storid + ") "+
"union all "+
"SELECT DISTINCT a.SALES_ID,
b.EMP_NAME FROM " +
"EMP_SALES_SCHED a,
EMP_SALES_OFFICER b " +
"WHERE a.DATE_SCHED =
'" + visitdates + "' AND a.STORE_ID = " + storid + " AND
a.SALES_ID = b.ID " +
"ORDER BY 1 DESC";
Prom_id.DataSource = table_prom;
Prom_id.TextField = "EMP_NAME";
Prom_id.ValueField = "SALES_ID";
Prom_id.DataBind();
Prom_id.Items.Insert(0, new ListEditItem("-- chose --", ""));
//================ Frontliner
table_front.SelectCommand = "SELECT id, emp_name "+
277
"FROM emp_store "+
"WHERE id_parent IN (SELECT
id_emp FROM gnrl_ref_store WHERE id = " + storid + " )";
front_id.DataSource = table_front;
front_id.TextField = "EMP_NAME";
front_id.ValueField = "ID";
front_id.DataBind();
front_id.Items.Insert(0, new ListEditItem("-- chose --", "
"));
}
protected void save_nonschedule_Click(object sender, EventArgs
e)
{
string ovisit_date = ForNET.DateToDB(visit_nosch.Text);
string oProm_id = mp_nosch.SelectedItem.Value.ToString();
string ofront_id = front_id.SelectedItem.Value.ToString();
string oimei = imei.Text;
string oprod_mod = prod_mod.Text;
string ocust_name = cust_name.Text;
string ocust_phone = cust_phone.Text;
string oemail = email.Text;
string storeid =
store_nosch.SelectedItem.Value.ToString();
string myQueryCity = "INSERT INTO DAILY_COLLECT_KG" +
"
(FL_ID,SALES_ID,PRODUCT_ID,PRODUCT_NO,COLLECT_DATE,INPUT_BY,UPDATE
_BY,COMP_ID,SALES_AUTHORIZE,CUSTOMER_NAME, EMAIL, NOTELP_CUSTOMER,
STORE_ID)" +
" VALUES (" +
"'" + ofront_id + "'," +
"'" + oProm_id + "'," +
"'" + oprod_mod + "'," +
"'" + oimei + "'," +
"" + ovisit_date + ", " +
"'" + Session["SESS_USER_ID"] + "',"
+
"'" + Session["SESS_USER_ID"] + "',"
+
"" + Session["SESS_COMP_ID"] + "," +
"'" + oProm_id + "'," +
"'" + ocust_name + "'," +
"'" + oemail + "'," +
"'" + ocust_phone + "', " +
"'" + storeid + "' " +
")";
bool suksesInsertCity =
ConnOracle.ExecNonQueryConnOra(myQueryCity);
if (suksesInsertCity)
{
string myQueryCitys = "INSERT INTO EMP_SALES_SCHED" +
"
(SALES_ID,DATE_SCHED,STORE_ID,INPUT_BY,UPDATE_BY,COMP_ID)" +
" VALUES (" +
"'" + oProm_id + "'," +
278
"" + ovisit_date + ", " +
"'" + storeid + "'," +
"'" + Session["SESS_USER_ID"] + "'," +
"'" + Session["SESS_USER_ID"] + "'," +
"" + Session["SESS_COMP_ID"] + "" +
")";
bool suksesInsertCitys =
ConnOracle.ExecNonQueryConnOra(myQueryCitys);
if (suksesInsertCitys)
{
ASPxComboBox1.SelectedItem.Value = "";
visit_date.Text = "";
Prom_id.SelectedItem.Text = "";
//aut_id.SelectedItem.Text = "";
front_id.SelectedItem.Text = "";
imei.Text = "";
prod_mod.Text = "";
cust_name.Text = "";
cust_phone.Text = "";
email.Text = "";
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Success.')\", 0);", true);
//Alert.Show("Insert Owner success.");
}
else
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed.')\", 0);", true);
}
}
else
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed.')\", 0);", true);
}
}
//================ With Schedule
============================//
protected void ASPxComboBox2_SelectedIndexChanged(object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
//===================== Store
string mallid = mall_nosch.SelectedItem.Value.ToString();
tb_store.SelectCommand = "SELECT ID, STORE_NAME FROM " +
"GNRL_REF_STORE where
ID_MALL = " + mallid + " ";
279
store_nosch.DataSource = tb_store;
store_nosch.TextField = "STORE_NAME";
store_nosch.ValueField = "ID";
store_nosch.DataBind();
store_nosch.Items.Insert(0, new ListEditItem("-- chose -", " "));
}
protected void store_nosch_SelectedIndexChanged(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
//===================== MP
string store = store_nosch.SelectedItem.Value.ToString();
tb_mp.SelectCommand = "SELECT w.sales_id, o.emp_name "+
"FROM emp_sales_workarea
w,emp_sales_officer o "+
"WHERE w.city_id IN
(SELECT city_id FROM gnrl_ref_store WHERE id= "+store+" ) "+
"AND w.sales_id =
o.id";
mp_nosch.DataSource = tb_mp;
mp_nosch.TextField = "EMP_NAME";
mp_nosch.ValueField = "SALES_ID";
mp_nosch.DataBind();
mp_nosch.Items.Insert(0, new ListEditItem("-- chose --", "
"));
//================ Frontliner
table_front.SelectCommand = "SELECT id, emp_name " +
"FROM emp_store " +
"WHERE id_parent IN (SELECT
id_emp FROM gnrl_ref_store WHERE id = " + store + ")";
front_id.DataSource = table_front;
front_id.TextField = "EMP_NAME";
front_id.ValueField = "ID";
front_id.DataBind();
front_id.Items.Insert(0, new ListEditItem("-- chose --", "
"));
}
protected void save_schedule_Click(object sender, EventArgs e)
{
string ovisit_date =
visit_date.SelectedItem.Value.ToString();
string oProm_id = Prom_id.SelectedItem.Value.ToString();
string oaut_id = aut_id.Text;
string ofront_id = front_id.SelectedItem.Value.ToString();
string oimei = imei.Text;
string oprod_mod = prod_mod.Text;
string ocust_name = cust_name.Text;
string ocust_phone = cust_phone.Text;
string oemail = email.Text;
string otoko_kunjungan =
toko_kunjungan.SelectedItem.Value.ToString();
280
string myQueryCity = "INSERT INTO DAILY_COLLECT_KG " +
"
(FL_ID,SALES_ID,PRODUCT_ID,PRODUCT_NO,COLLECT_DATE,INPUT_BY,UPDATE
_BY,COMP_ID, " +
"SALES_AUTHORIZE,CUSTOMER_NAME,
EMAIL, NOTELP_CUSTOMER, STORE_ID)" +
" VALUES ( " +
"'" + ofront_id + "'," +
"'" + oProm_id + "'," +
"'" + oprod_mod + "'," +
"'" + oimei + "'," +
"'" + ovisit_date + "'," +
"'" + Session["SESS_USER_ID"] + "',"
+
"'" + Session["SESS_USER_ID"] + "',"
+
"" + Session["SESS_COMP_ID"] + "," +
"'" + oaut_id + "'," +
"'" + ocust_name + "'," +
"'" + oemail + "'," +
"'" + ocust_phone + "', " +
"'" + otoko_kunjungan + "'" +
")";
bool suksesInsertCity =
ConnOracle.ExecNonQueryConnOra(myQueryCity);
if (suksesInsertCity)
{
//visit_date.Text = "";
//Prom_id.SelectedItem.Text = "";
////aut_id.SelectedItem.Text = "";
Label5.Text = "";
prod_type.Text = "";
front_id.SelectedItem.Text = "";
imei.Text = "";
prod_mod.Text = "";
cust_name.Text = "";
cust_phone.Text = "";
email.Text = "";
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Success.')\", 0);", true);
//Alert.Show("Insert Owner success.");
}
else
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed.')\", 0);", true);
}
}
281
//========== event Open Grid
protected void ASPxButton1_Click(object sender, EventArgs e)
{
ASPxGridView1.Visible = true;
ASPxButton1.Visible = false;
ASPxButton2.Visible = true;
}
//========== event Close Grid
protected void ASPxButton2_Click(object sender, EventArgs e)
{
ASPxGridView1.Visible = false;
ASPxButton1.Visible = true;
ASPxButton2.Visible = false;
}
//============= event Cancel
protected void ASPxButton3_Click(object sender, EventArgs e)
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "MessagePopUp", "alert('Thankyou');
window.location.href = 'ImeiWarrant.aspx';", true);
}
}
MasterPage.master
<%@ Master Language="C#" AutoEventWireup="true"
CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxNavBar" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body topmargin="7" leftmargin="7" rightmargin="7"
bottommargin="7">
<form id="form1" runat="server">
<div style="margin: 0px">
<table width="100%">
282
<tr>
<td colspan="4" style="width: 270px; height: 1px;"
align="left" rowspan="3" valign="top">
<dx:ASPxRoundPanel id="ASPxRoundPanel1"
runat="server" CssFilePath="~/App_Themes/Silver/{0}/styles.css"
CssPostfix="Silver" HeaderText=""
ImageFolder="~/App_Themes/Silver/{0}/" ShowDefaultImages="False"
ShowHeader="False" Width="200px">
<bottomrightcorner height="10px"
url="~/App_Themes/Silver/Web/rpBottomRightCorner.gif"
width="6px"></bottomrightcorner>
<border bordercolor="#D7D7D7"
borderstyle="Solid" borderwidth="1px"></border>
<bottomedge>
<BackgroundImage Repeat="RepeatX"
ImageUrl="~/App_Themes/Silver/Web/rpBottomBack.gif"></BackgroundIm
age>
</bottomedge>
<toprightcorner height="6px"
url="~/App_Themes/Silver/Web/rpTopRightCorner.gif"
width="6px"></toprightcorner>
<borderbottom
borderwidth="0px"></borderbottom>
<panelcollection>
<dx:PanelContent runat="server"><TABLE width="100%" align=center
__designer:dtid="844424930131977"><TBODY><TR
__designer:dtid="844424930131978"><TD style="WIDTH: 100%; HEIGHT:
110px; TEXT-ALIGN: center" colSpan=3
__designer:dtid="844424930131979"><asp:Image runat="server"
ID="Image1" ImageUrl="~/images/logo-dell.gif"
__designer:dtid="844459289870336"></asp:Image>
</TD></TR><TR __designer:dtid="844424930131980"><TD style="WIDTH:
100%; HEIGHT: 20px" colSpan=3
__designer:dtid="844424930131981"></TD></TR><TR
__designer:dtid="844424930131982"><TD style="WIDTH: 100%"
vAlign=top align=left colSpan=3
__designer:dtid="844424930131983"><STRONG
__designer:dtid="844424930131984"><SPAN style="COLOR: #316ac5"
__designer:dtid="844424930131985"><asp:Label runat="server" FontSize="Larger" Font-Bold="True" Width="174px" ForeColor="SteelBlue"
ID="Label1" __designer:dtid="844467879804928"></asp:Label>
<asp:Label runat="server" Font-Italic="False" Font-Size="Small"
Font-Bold="True" Width="160px" ForeColor="Black" ID="Label2"
__designer:dtid="844467879804929"></asp:Label>
</SPAN></STRONG></TD></TR><TR
__designer:dtid="844467879804930"><TD style="WIDTH: 100%; HEIGHT:
15px" colSpan=3 __designer:dtid="844467879804931"></TD></TR><TR
__designer:dtid="844467879804932"><TD style="WIDTH: 100%; HEIGHT:
10px" vAlign=top align=left colSpan=3
__designer:dtid="844467879804933"><STRONG
__designer:dtid="844467879804934"><SPAN style="COLOR: #316ac5"
__designer:dtid="844467879804935"><asp:Label runat="server"
Width="74px" ID="Label4"
__designer:dtid="844467879804936"></asp:Label>
</SPAN></STRONG><asp:Label runat="server" Font-Size="Small"
Width="183px" ForeColor="Red" ID="Label3"
__designer:dtid="844467879804937"></asp:Label>
</TD></TR><TR __designer:dtid="844467879804938"><TD style="WIDTH:
100%; HEIGHT: 288px; TEXT-ALIGN: center" vAlign=top align=center
283
colSpan=3 rowSpan=2
__designer:dtid="844467879804939"><asp:XmlDataSource
runat="server" EnableViewState="False"
TransformFile="TransformXSLT.xsl" XPath="MenuItems/MenuItem"
ID="xmlDataSource"
__designer:dtid="844467879804940"></asp:XmlDataSource>
<dx:ASPxNavBar runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" AutoCollapse="True" ID="ASPxNavBar1"
Width="260px" DataSourceID="xmlDataSource" GroupSpacing="1px"
ExpandButtonPosition="Right" EnableAnimation="True"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
__designer:dtid="844467879804941">
<LoadingPanelImage Url="~/App_Themes/Aqua/Web/nbLoading.gif"
__designer:dtid="844467879804944"></LoadingPanelImage>
<GroupContentStyle ItemSpacing="1px"
__designer:dtid="844467879804942"></GroupContentStyle>
<ItemStyle ImageSpacing="10px"
__designer:dtid="844467879804943"></ItemStyle>
</dx:ASPxNavBar>
 <BR __designer:dtid="844467879804945" /> <asp:Image
runat="server" ImageAlign="AbsMiddle"
DescriptionUrl="~/LogOut.aspx" ID="Image2"
ImageUrl="~/images/logOut.JPG"
__designer:dtid="844467879804946"></asp:Image>
<asp:HyperLink runat="server" Font-Underline="False" FontBold="True" ForeColor="Red" ID="HyperLink1"
NavigateUrl="~/LogOut.aspx" __designer:dtid="844467879804947">Log
Out</asp:HyperLink>
</TD></TR><TR
__designer:dtid="844467879804948"></TR></TBODY></TABLE></dx:PanelC
ontent>
</panelcollection>
<topleftcorner height="6px"
url="~/App_Themes/Silver/Web/rpTopLeftCorner.gif"
width="6px"></topleftcorner>
<backgroundimage
imageurl="~/App_Themes/Silver/Web/rpContentBack.gif"
repeat="RepeatX"></backgroundimage>
<bottomleftcorner height="10px"
url="~/App_Themes/Silver/Web/rpBottomLeftCorner.gif"
width="6px"></bottomleftcorner>
</dx:ASPxRoundPanel>
  </td>
<td align="left" colspan="1" rowspan="3"
style="width: 619px; height: 1px" valign="top">
<asp:contentplaceholder id="Content_Main" runat="server">
</asp:contentplaceholder>
</td>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
</div>
</form>
284
</body>
</html>
City.aspx
<%@ Page Language="C#"
MasterPageFile="../AppModules/MasterPage.master"
AutoEventWireup="true" CodeFile="City.aspx.cs"
Inherits="Administrator_Default2" Title="Untitled Page"
EnableEventValidation="false" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
<div>
<!-- ======================== TABLE UTAMA
=========================== -->
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
BackColor="White" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
CssPostfix="Aqua" HeaderText="Master City"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
Width="200px">
<topedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif"></BackgroundImage>
</topedge>
<leftedge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif"></BackgroundImage>
</leftedge>
<headercontent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headercontent>
<contentpaddings padding="14px"></contentpaddings>
<rightedge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif"></BackgroundImage
>
</rightedge>
<headerrightedge>
285
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headerrightedge>
<border bordercolor="#AECAF0" borderstyle="Solid"
borderwidth="1px"></border>
<headerstyle backcolor="#E0EDFF">
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></BorderBottom>
</headerstyle>
<headerleftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headerleftedge>
<bottomedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Bottom"
ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif"></BackgroundImag
e>
</bottomedge>
<panelcollection>
<dx:PanelContent runat="server"><asp:Label runat="server"
Width="450px" ID="CaptionUtama">Master City</asp:Label>
<BR /><TABLE width=900><TBODY><TR><TD style="WIDTH:
100px">Province</TD><TD style="WIDTH: 6px">:</TD><TD style="WIDTH:
891px"><asp:DropDownList runat="server" DataSourceID="Db_Province"
DataValueField="ID" ID="CityProv"
DataTextField="PROV_NAME"></asp:DropDownList>
</TD></TR><TR><TD style="WIDTH: 100px; HEIGHT: 26px">Code</TD><TD
style="WIDTH: 6px; HEIGHT: 26px">:</TD><TD style="WIDTH: 891px;
HEIGHT: 26px"><asp:TextBox runat="server"
ID="CityCode"></asp:TextBox>
</TD></TR><TR><TD style="WIDTH: 100px">Name</TD><TD style="WIDTH:
6px">:</TD><TD style="WIDTH: 891px"><asp:TextBox runat="server"
ID="CityName"></asp:TextBox>
</TD></TR><TR><TD style="WIDTH: 100px; HEIGHT:
71px">Status</TD><TD style="WIDTH: 6px; HEIGHT: 71px">:</TD><TD
style="WIDTH: 891px; HEIGHT: 71px"><asp:CheckBoxList
runat="server" ID="CityStatus"><asp:ListItem
Value="Y">Active</asp:ListItem>
<asp:ListItem Value="N">Inactive</asp:ListItem>
</asp:CheckBoxList>
</TD></TR><TR><TD style="WIDTH: 100px">Postal Code</TD><TD
style="WIDTH: 6px">:</TD><TD style="WIDTH: 891px"><asp:TextBox
runat="server" ID="CityPostal"></asp:TextBox>
</TD></TR><TR><TD style="WIDTH: 100px">Region</TD><TD
style="WIDTH: 6px">:</TD><TD style="WIDTH:
891px"><asp:DropDownList runat="server" DataSourceID="tableRegion"
DataValueField="ID" ID="CityRegion"
DataTextField="PARAMETER_VALUE"><asp:ListItem Value="1">Region
1</asp:ListItem>
<asp:ListItem Value="2">Region 2</asp:ListItem>
</asp:DropDownList>
</TD></TR><TR><TD style="WIDTH: 100px; HEIGHT: 26px"></TD><TD
style="WIDTH: 6px; HEIGHT: 26px"></TD><TD style="WIDTH: 891px;
HEIGHT: 26px"><asp:Button runat="server" ID="Btn_CitySave"
Width="61px" Text="Save"
OnClick="Btn_CitySave_Click"></asp:Button>
286
<asp:Button runat="server" ID="Btn_CityCancel" Text="Cancel"
OnClick="Btn_CityCancel_Click"></asp:Button>
</TD></TR><TR><TD style="HEIGHT: 37px" colSpan=3>
<HR color=cornflowerblue />
</TD></TR><TR><TD vAlign=top colSpan=3><dx:ASPxGridView
runat="server" CssPostfix="Aqua" Width="900px" ID="ASPxGridView1"
DataSourceID="Db_City" KeyFieldName="ID"
AutoGenerateColumns="False"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<Images SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
<LoadingPanelOnStatusBar
Url="~/App_Themes/Aqua/GridView/gvLoadingOnStatusBar.gif"></Loadin
gPanelOnStatusBar>
<LoadingPanel
Url="~/App_Themes/Aqua/GridView/Loading.gif"></LoadingPanel>
</Images>
<SettingsEditing PopupEditFormHorizontalAlign="WindowCenter"
PopupEditFormModal="True" Mode="PopupEditForm"></SettingsEditing>
<ImagesFilterControl>
<LoadingPanel
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanel>
</ImagesFilterControl>
<Styles CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<LoadingPanel ImageSpacing="8px"></LoadingPanel>
</Styles>
<ImagesEditors>
<SpinEditLargeIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeIncImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeIncImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeIncrement>
<SpinEditLargeDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeDecImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeDecImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeDecrement>
<SpinEditIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditIncrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditIncrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditIncrement>
<SpinEditDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditDecrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditDecrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditDecrement>
287
<DropDownEditDropDown>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</DropDownEditDropDown>
</ImagesEditors>
<Settings ShowFilterRow="True"></Settings>
<StylesEditors>
<CalendarHeader Spacing="1px"></CalendarHeader>
<ProgressBar Height="25px"></ProgressBar>
</StylesEditors>
<Columns>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="0"><DataItemTemplate>
<a
href="City.aspx?id_edit=<%#Eval ("ID")%>">Edit</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="1"><DataItemTemplate>
<a
href="City.aspx?id_delete=<%#Eval ("ID")%>">Delete</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewCommandColumn VisibleIndex="1" Visible="False">
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn Visible="False" ReadOnly="True"
VisibleIndex="1" FieldName="ID"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn ReadOnly="True" VisibleIndex="5"
FieldName="PROV_ID"
Caption="Province"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2" FieldName="CITY_CODE"
Caption="Code"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3" FieldName="CITY_NAME"
Caption="Name"></dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn Visible="False" VisibleIndex="4"
FieldName="INPUT_DATE"></dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn Visible="False" VisibleIndex="4"
FieldName="INPUT_BY"></dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn Visible="False" VisibleIndex="4"
FieldName="UPDATE_DATE"></dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn Visible="False" VisibleIndex="4"
FieldName="UPDATE_BY"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4" FieldName="INACTIVE"
Caption="Inactive"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="6" FieldName="REGION_ID"
Caption="Region"></dx:GridViewDataTextColumn>
288
<dx:GridViewDataTextColumn VisibleIndex="7"
FieldName="POSTAL_CODE" Caption="Postal
Code"></dx:GridViewDataTextColumn>
</Columns>
<SettingsLoadingPanel ImagePosition="Top"></SettingsLoadingPanel>
</dx:ASPxGridView>
<asp:SqlDataSource runat="server" ID="Db_City"
SelectCommand="SELECT * FROM "GNRL_REF_CITY""
OldValuesParameterFormatString="original_{0}"
ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM
"GNRL_REF_CITY" WHERE "ID" = :original_ID AND
"PROV_ID" = :original_PROV_ID AND
(("CITY_CODE" = :original_CITY_CODE) OR
("CITY_CODE" IS NULL AND :original_CITY_CODE IS NULL))
AND (("CITY_NAME" = :original_CITY_NAME) OR
("CITY_NAME" IS NULL AND :original_CITY_NAME IS NULL))
AND (("INPUT_DATE" = :original_INPUT_DATE) OR
("INPUT_DATE" IS NULL AND :original_INPUT_DATE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
(("UPDATE_DATE" = :original_UPDATE_DATE) OR
("UPDATE_DATE" IS NULL AND :original_UPDATE_DATE IS
NULL)) AND (("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))
AND (("INACTIVE" = :original_INACTIVE) OR
("INACTIVE" IS NULL AND :original_INACTIVE IS NULL)) AND
(("REGION_ID" = :original_REGION_ID) OR
("REGION_ID" IS NULL AND :original_REGION_ID IS NULL))
AND (("POSTAL_CODE" = :original_POSTAL_CODE) OR
("POSTAL_CODE" IS NULL AND :original_POSTAL_CODE IS
NULL))" InsertCommand="INSERT INTO "GNRL_REF_CITY"
("ID", "PROV_ID", "CITY_CODE",
"CITY_NAME", "INPUT_DATE",
"INPUT_BY", "UPDATE_DATE",
"UPDATE_BY", "INACTIVE",
"REGION_ID", "POSTAL_CODE") VALUES (:ID,
:PROV_ID, :CITY_CODE, :CITY_NAME, :INPUT_DATE, :INPUT_BY,
:UPDATE_DATE, :UPDATE_BY, :INACTIVE, :REGION_ID, :POSTAL_CODE)"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" UpdateCommand="UPDATE "GNRL_REF_CITY" SET
"CITY_CODE" = :CITY_CODE, "CITY_NAME" =
:CITY_NAME, "INPUT_DATE" = :INPUT_DATE,
"INPUT_BY" = :INPUT_BY, "UPDATE_DATE" =
:UPDATE_DATE, "UPDATE_BY" = :UPDATE_BY,
"INACTIVE" = :INACTIVE, "REGION_ID" =
:REGION_ID, "POSTAL_CODE" = :POSTAL_CODE WHERE
"ID" = :original_ID AND "PROV_ID" =
:original_PROV_ID AND (("CITY_CODE" =
:original_CITY_CODE) OR ("CITY_CODE" IS NULL AND
:original_CITY_CODE IS NULL)) AND (("CITY_NAME" =
:original_CITY_NAME) OR ("CITY_NAME" IS NULL AND
:original_CITY_NAME IS NULL)) AND (("INPUT_DATE" =
:original_INPUT_DATE) OR ("INPUT_DATE" IS NULL AND
:original_INPUT_DATE IS NULL)) AND (("INPUT_BY" =
:original_INPUT_BY) OR ("INPUT_BY" IS NULL AND
:original_INPUT_BY IS NULL)) AND (("UPDATE_DATE" =
:original_UPDATE_DATE) OR ("UPDATE_DATE" IS NULL AND
289
:original_UPDATE_DATE IS NULL)) AND (("UPDATE_BY" =
:original_UPDATE_BY) OR ("UPDATE_BY" IS NULL AND
:original_UPDATE_BY IS NULL)) AND (("INACTIVE" =
:original_INACTIVE) OR ("INACTIVE" IS NULL AND
:original_INACTIVE IS NULL)) AND (("REGION_ID" =
:original_REGION_ID) OR ("REGION_ID" IS NULL AND
:original_REGION_ID IS NULL)) AND (("POSTAL_CODE" =
:original_POSTAL_CODE) OR ("POSTAL_CODE" IS NULL AND
:original_POSTAL_CODE IS NULL))"><InsertParameters>
<asp:Parameter Type="Decimal" Name="ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="CITY_CODE"></asp:Parameter>
<asp:Parameter Type="String" Name="CITY_NAME"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="String" Name="INACTIVE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="REGION_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="POSTAL_CODE"></asp:Parameter>
</InsertParameters>
<UpdateParameters>
<asp:Parameter Type="String" Name="CITY_CODE"></asp:Parameter>
<asp:Parameter Type="String" Name="CITY_NAME"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="String" Name="INACTIVE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="REGION_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="POSTAL_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_CITY_CODE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_CITY_NAME"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_INACTIVE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_REGION_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_POSTAL_CODE"></asp:Parameter>
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_CITY_CODE"></asp:Parameter>
290
<asp:Parameter Type="String"
Name="original_CITY_NAME"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_INACTIVE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_REGION_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_POSTAL_CODE"></asp:Parameter>
</DeleteParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Db_Province"
SelectCommand="SELECT * FROM "GNRL_REF_PROVINCE""
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="tableRegion"
SelectCommand="SELECT "ID", "PARAMETER_VALUE",
"PAR_ID" FROM "GNRL_PARAMETER_VALUE" WHERE
("PAR_ID" = :PAR_ID) ORDER BY
"PARAMETER_VALUE"" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"><SelectParameters>
<asp:Parameter Type="Decimal" DefaultValue="2"
Name="PAR_ID"></asp:Parameter>
</SelectParameters>
</asp:SqlDataSource>
</TD></TR></TBODY></TABLE></dx:PanelContent>
</panelcollection>
<noheadertopedge backcolor="White">
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif"></Backgroun
dImage>
</noheadertopedge>
</dx:ASPxRoundPanel><br />
<!-- ======================== BATAS AKHIR TABLE UTAMA
=========================== -->
 
</div>
</form>
</asp:Content>
City.aspx.cs
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
291
using
using
using
using
using
using
using
using
using
using
using
using
using
using
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
DevExpress.Web.ASPxPivotGrid;
System.Collections.Generic;
DevExpress.XtraCharts;
CJM.Database.Oracle;
System.Data.OracleClient;
CJM.Reference;
CJM.Project.LGE;
DevExpress.Web.ASPxEditors;
DevExpress.Web.ASPxGridView;
public partial class Administrator_Default2 : System.Web.UI.Page
{
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = buzdomain.com)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =blitz.buzdomain.com))); User
Id=buzapps; password=qwerty007;";
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = blitz.co.id)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =buzdev))); User Id=buzapps;
password=qwerty007;";
string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =xronosit))); User
Id=buzapps; password=qwerty007;";
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_USER_ID"].ToString() == null)
{
Response.Redirect("../Default.aspx");
}
//======================== PROSES EDIT
====================//
if (Request.QueryString["id_edit"] != "")
{
string edit = Request.QueryString["id_edit"];
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
conn.Open();
string query = " SELECT PROV_ID,CITY_CODE,
CITY_NAME,REGION_ID,POSTAL_CODE, INACTIVE FROM GNRL_REF_CITY WHERE
ID ='" + edit + "'";
OracleCommand cmd = new OracleCommand(query,
conn);
OracleDataReader ds = cmd.ExecuteReader();
292
if (ds.Read())
{
CityCode.Text = ds["CITY_CODE"].ToString();
CityName.Text = ds["CITY_NAME"].ToString();
CityPostal.Text =
ds["POSTAL_CODE"].ToString();
CityProv.SelectedItem.Value =
ds["PROV_ID"].ToString();
CityStatus.SelectedItem.Text =
ds["INACTIVE"].ToString();
CityRegion.SelectedItem.Text =
ds["REGION_ID"].ToString();
}
}
}
// ------------------------------ EVENT TOMBOL SAVE
protected void Btn_CitySave_Click(object sender, EventArgs e)
{
string oCityProv = CityProv.SelectedItem.Value;
string oCityCode = CityCode.Text;
string oCityName = CityName.Text;
string oCityStatus = CityStatus.SelectedItem.Value;
string oCityRegion = CityRegion.SelectedItem.Value;
string oCityPostal = CityPostal.Text;
//---------------------------------------------------------------------//INSERT KE TABLE GNRL_REF_CITY
//----------------------------------------------------------------------string myQueryCity = "INSERT INTO GNRL_REF_CITY" +
"
(prov_id,City_CODE,City_NAME,INACTIVE,REGION_ID)" +
" VALUES(" +
"'" + oCityProv + "'," +
"'" + oCityCode + "'," +
"'" + oCityName + "'," +
"'" + oCityStatus + "'," +
"'" + oCityRegion + "'," +
"'" + oCityPostal + "'" +
")";
bool suksesInsertCity =
ConnOracle.ExecNonQueryConnOra(myQueryCity);
if (suksesInsertCity)
293
{
CityProv.SelectedItem.Text = "";
CityCode.Text = "";
CityName.Text = "";
CityStatus.SelectedItem.Selected = false;
CityRegion.SelectedItem.Text = "";
CityPostal.Text = "";
Alert.Show("Insert City Success.");
}
else
{
//lblMsg.Text = "Insert Failed .";
Alert.Show("Insert City Failed.");
}
}
protected void Btn_CityCancel_Click(object sender, EventArgs
e)
{
Response.Redirect("province.aspx");
}
}
Company.aspx
<%@ Page Language="C#"
MasterPageFile="../AppModules/MasterPage.master"
AutoEventWireup="true" CodeFile="Company.aspx.cs"
Inherits="Administrator_Default2" Title="Untitled Page"
EnableEventValidation="false" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxClasses" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
294
<div>
<!-- ======================== TABLE UTAMA
=========================== -->
<dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server"
BackColor="White" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
CssPostfix="Aqua" HeaderText="Master Company"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
Width="200px">
<TopEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif"></BackgroundImage>
</TopEdge>
<LeftEdge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif"></BackgroundImage>
</LeftEdge>
<HeaderContent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderContent>
<ContentPaddings Padding="14px" />
<RightEdge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif"></BackgroundImage
>
</RightEdge>
<HeaderRightEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderRightEdge>
<Border BorderColor="#AECAF0" BorderStyle="Solid"
BorderWidth="1px" />
<HeaderStyle BackColor="#E0EDFF">
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></BorderBottom>
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</HeaderLeftEdge>
<BottomEdge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Bottom"
ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif"></BackgroundImag
e>
</BottomEdge>
<PanelCollection>
<dx:PanelContent runat="server"><asp:Label runat="server"
Width="450px" ID="CaptionUtama" Visible="False">Master
City</asp:Label>
<BR />
<TABLE width=900><TBODY><TR><TD style="WIDTH: 170px; HEIGHT:
26px">Code</TD><TD style="WIDTH: 10px; HEIGHT: 26px">:</TD><TD
style="WIDTH: 774px; HEIGHT: 26px"><asp:TextBox runat="server"
ID="ComCode"></asp:TextBox>
295
</TD></TR><TR><TD style="WIDTH: 170px">Name</TD><TD style="WIDTH:
10px">:</TD><TD style="WIDTH: 774px"><asp:TextBox runat="server"
ID="ComName"></asp:TextBox>
</TD></TR><TR><TD style="WIDTH: 170px">Province</TD><TD
style="WIDTH: 10px">:</TD><TD style="WIDTH:
774px"><asp:DropDownList runat="server" DataSourceID="Db_Province"
AutoPostBack="True" DataValueField="ID" ID="ComProv"
DataTextField="PROV_NAME"></asp:DropDownList>
</TD></TR><TR><TD style="WIDTH: 170px; HEIGHT: 21px">City</TD><TD
style="WIDTH: 10px; HEIGHT: 21px">:</TD><TD style="WIDTH: 774px;
HEIGHT: 21px"><asp:DropDownList runat="server"
DataSourceID="Db_City" DataValueField="ID" ID="ComCity"
DataTextField="CITY_NAME"></asp:DropDownList>
</TD></TR><TR><TD style="WIDTH: 170px; HEIGHT:
42px">Address</TD><TD style="WIDTH: 10px; HEIGHT: 42px">:</TD><TD
style="WIDTH: 774px; HEIGHT: 42px"><asp:TextBox runat="server"
ID="ComAddr" TextMode="MultiLine"></asp:TextBox>
</TD></TR><TR><TD style="WIDTH: 170px; HEIGHT:
26px">Phone</TD><TD style="WIDTH: 10px; HEIGHT: 26px">:</TD><TD
style="WIDTH: 774px; HEIGHT: 26px"><asp:TextBox runat="server"
ID="ComPhone"></asp:TextBox>
</TD></TR><TR><TD style="WIDTH: 170px; HEIGHT: 21px">Contact
Person</TD><TD style="WIDTH: 10px; HEIGHT: 21px">:</TD><TD
style="WIDTH: 774px; HEIGHT: 21px"><asp:TextBox runat="server"
ID="ComContact"></asp:TextBox>
</TD></TR><TR><TD style="WIDTH: 170px; HEIGHT: 21px">Product
Brand</TD><TD style="WIDTH: 10px; HEIGHT: 21px">:</TD><TD
style="WIDTH: 774px; HEIGHT: 21px"><asp:TextBox runat="server"
ID="ComBrand"></asp:TextBox>
</TD></TR><TR><TD style="WIDTH: 170px">Status</TD><TD
style="WIDTH: 10px">:</TD><TD style="WIDTH:
774px"><asp:CheckBoxList runat="server"
ID="ComStatus"><asp:ListItem Value="Y">Active</asp:ListItem>
<asp:ListItem Value="N">Inactive</asp:ListItem>
</asp:CheckBoxList>
</TD></TR><TR><TD style="WIDTH: 170px; HEIGHT: 26px"></TD><TD
style="WIDTH: 10px; HEIGHT: 26px"></TD><TD style="WIDTH: 774px;
HEIGHT: 26px"><asp:Button runat="server" ID="Button1" Width="60px"
Text="Save" OnClick="Button1_Click"></asp:Button>
<asp:Button runat="server" ID="BtnUpdate" Text="Cancel"
OnClick="BtnUpdate_Click"></asp:Button>
</TD></TR><TR><TD style="WIDTH: 170px; HEIGHT: 16px"></TD><TD
style="WIDTH: 10px; HEIGHT: 16px"></TD><TD style="WIDTH: 774px;
HEIGHT: 16px"></TD></TR><TR><TD colSpan=3>
<HR color=cornflowerblue />
</TD></TR><TR><TD vAlign=top colSpan=3><dx:ASPxGridView
runat="server" CssPostfix="Aqua" Width="900px" ID="ASPxGridView1"
DataSourceID="SqlDataSource1" KeyFieldName="ID"
AutoGenerateColumns="False"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<Images SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
<LoadingPanelOnStatusBar
Url="~/App_Themes/Aqua/GridView/gvLoadingOnStatusBar.gif"></Loadin
gPanelOnStatusBar>
<LoadingPanel
Url="~/App_Themes/Aqua/GridView/Loading.gif"></LoadingPanel>
</Images>
296
<SettingsEditing PopupEditFormHorizontalAlign="WindowCenter"
PopupEditFormModal="True" PopupEditFormAllowResize="True"
Mode="PopupEditForm"></SettingsEditing>
<ImagesFilterControl>
<LoadingPanel
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanel>
</ImagesFilterControl>
<Styles CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<LoadingPanel ImageSpacing="8px"></LoadingPanel>
</Styles>
<ImagesEditors>
<SpinEditLargeIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeIncImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeIncImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeIncrement>
<SpinEditLargeDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeDecImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeDecImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeDecrement>
<SpinEditIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditIncrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditIncrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditIncrement>
<SpinEditDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditDecrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditDecrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditDecrement>
<DropDownEditDropDown>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</DropDownEditDropDown>
</ImagesEditors>
<Settings ShowVerticalScrollBar="True" ShowFilterRow="True"
ShowHorizontalScrollBar="True"></Settings>
<StylesEditors>
<CalendarHeader Spacing="1px"></CalendarHeader>
<ProgressBar Height="25px"></ProgressBar>
</StylesEditors>
297
<SettingsPager PageSize="5"
NumericButtonCount="5"></SettingsPager>
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0" FixedStyle="Left">
<DeleteButton Visible="True"></DeleteButton>
<EditButton Visible="True"></EditButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn Visible="False" ReadOnly="True"
VisibleIndex="1" FieldName="ID"
FixedStyle="Left"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="1" FieldName="COMP_CODE"
FixedStyle="Left" Caption="Code"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2" FieldName="COMP_NAME"
FixedStyle="Left" Caption="Name"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3" FieldName="PROV_ID"
Caption="Province"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4" FieldName="ID_CITY"
Caption="City"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="5" FieldName="INACTIVE"
Caption="Active"></dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn Visible="False" VisibleIndex="6"
FieldName="INPUT_DATE"></dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn Visible="False" VisibleIndex="6"
FieldName="INPUT_BY"></dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn Visible="False" VisibleIndex="7"
FieldName="UPDATE_DATE"></dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn Visible="False" VisibleIndex="6"
FieldName="UPDATE_BY"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="6" FieldName="ADDRESS"
Caption="Address"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="7" FieldName="TELP_NO"
Caption="Phone"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="8"
FieldName="CONTACT_NAME" Caption="Contact
Person"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="9"
FieldName="PRODUCT_BRAND" Caption="Product
Brand"></dx:GridViewDataTextColumn>
</Columns>
<SettingsLoadingPanel ImagePosition="Top"></SettingsLoadingPanel>
</dx:ASPxGridView>
</TD></TR></TBODY></TABLE>
<asp:SqlDataSource runat="server" ID="SqlDataSource1"
SelectCommand="SELECT * FROM "GNRL_REF_COMPANY" ORDER BY
"COMP_NAME""
OldValuesParameterFormatString="original_{0}"
ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM
"GNRL_REF_COMPANY" WHERE "ID" = :original_ID
AND "COMP_CODE" = :original_COMP_CODE AND
"COMP_NAME" = :original_COMP_NAME AND
(("PROV_ID" = :original_PROV_ID) OR ("PROV_ID"
IS NULL AND :original_PROV_ID IS NULL)) AND (("ID_CITY"
= :original_ID_CITY) OR ("ID_CITY" IS NULL AND
:original_ID_CITY IS NULL)) AND (("INACTIVE" =
298
:original_INACTIVE) OR ("INACTIVE" IS NULL AND
:original_INACTIVE IS NULL)) AND (("INPUT_DATE" =
:original_INPUT_DATE) OR ("INPUT_DATE" IS NULL AND
:original_INPUT_DATE IS NULL)) AND (("INPUT_BY" =
:original_INPUT_BY) OR ("INPUT_BY" IS NULL AND
:original_INPUT_BY IS NULL)) AND (("UPDATE_DATE" =
:original_UPDATE_DATE) OR ("UPDATE_DATE" IS NULL AND
:original_UPDATE_DATE IS NULL)) AND (("UPDATE_BY" =
:original_UPDATE_BY) OR ("UPDATE_BY" IS NULL AND
:original_UPDATE_BY IS NULL)) AND (("ADDRESS" =
:original_ADDRESS) OR ("ADDRESS" IS NULL AND
:original_ADDRESS IS NULL)) AND (("TELP_NO" =
:original_TELP_NO) OR ("TELP_NO" IS NULL AND
:original_TELP_NO IS NULL)) AND (("CONTACT_NAME" =
:original_CONTACT_NAME) OR ("CONTACT_NAME" IS NULL AND
:original_CONTACT_NAME IS NULL)) AND (("PRODUCT_BRAND" =
:original_PRODUCT_BRAND) OR ("PRODUCT_BRAND" IS NULL AND
:original_PRODUCT_BRAND IS NULL))" InsertCommand="INSERT INTO
"GNRL_REF_COMPANY" ("ID",
"COMP_CODE", "COMP_NAME", "PROV_ID",
"ID_CITY", "INACTIVE", "INPUT_DATE",
"INPUT_BY", "UPDATE_DATE",
"UPDATE_BY", "ADDRESS", "TELP_NO",
"CONTACT_NAME", "PRODUCT_BRAND") VALUES (:ID,
:COMP_CODE, :COMP_NAME, :PROV_ID, :ID_CITY, :INACTIVE,
:INPUT_DATE, :INPUT_BY, :UPDATE_DATE, :UPDATE_BY, :ADDRESS,
:TELP_NO, :CONTACT_NAME, :PRODUCT_BRAND)" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
UpdateCommand="UPDATE "GNRL_REF_COMPANY" SET
"COMP_CODE" = :COMP_CODE, "COMP_NAME" =
:COMP_NAME, "PROV_ID" = :PROV_ID, "ID_CITY" =
:ID_CITY, "INACTIVE" = :INACTIVE, "INPUT_DATE"
= :INPUT_DATE, "INPUT_BY" = :INPUT_BY,
"UPDATE_DATE" = :UPDATE_DATE, "UPDATE_BY" =
:UPDATE_BY, "ADDRESS" = :ADDRESS, "TELP_NO" =
:TELP_NO, "CONTACT_NAME" = :CONTACT_NAME,
"PRODUCT_BRAND" = :PRODUCT_BRAND WHERE "ID" =
:original_ID AND "COMP_CODE" = :original_COMP_CODE AND
"COMP_NAME" = :original_COMP_NAME AND
(("PROV_ID" = :original_PROV_ID) OR ("PROV_ID"
IS NULL AND :original_PROV_ID IS NULL)) AND (("ID_CITY"
= :original_ID_CITY) OR ("ID_CITY" IS NULL AND
:original_ID_CITY IS NULL)) AND (("INACTIVE" =
:original_INACTIVE) OR ("INACTIVE" IS NULL AND
:original_INACTIVE IS NULL)) AND (("INPUT_DATE" =
:original_INPUT_DATE) OR ("INPUT_DATE" IS NULL AND
:original_INPUT_DATE IS NULL)) AND (("INPUT_BY" =
:original_INPUT_BY) OR ("INPUT_BY" IS NULL AND
:original_INPUT_BY IS NULL)) AND (("UPDATE_DATE" =
:original_UPDATE_DATE) OR ("UPDATE_DATE" IS NULL AND
:original_UPDATE_DATE IS NULL)) AND (("UPDATE_BY" =
:original_UPDATE_BY) OR ("UPDATE_BY" IS NULL AND
:original_UPDATE_BY IS NULL)) AND (("ADDRESS" =
:original_ADDRESS) OR ("ADDRESS" IS NULL AND
:original_ADDRESS IS NULL)) AND (("TELP_NO" =
:original_TELP_NO) OR ("TELP_NO" IS NULL AND
:original_TELP_NO IS NULL)) AND (("CONTACT_NAME" =
:original_CONTACT_NAME) OR ("CONTACT_NAME" IS NULL AND
299
:original_CONTACT_NAME IS NULL)) AND (("PRODUCT_BRAND" =
:original_PRODUCT_BRAND) OR ("PRODUCT_BRAND" IS NULL AND
:original_PRODUCT_BRAND IS NULL))"><InsertParameters>
<asp:Parameter Type="Decimal" Name="ID"></asp:Parameter>
<asp:Parameter Type="String" Name="COMP_CODE"></asp:Parameter>
<asp:Parameter Type="String" Name="COMP_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_CITY"></asp:Parameter>
<asp:Parameter Type="String" Name="INACTIVE"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"></asp:Parameter>
<asp:Parameter Type="String" Name="TELP_NO"></asp:Parameter>
<asp:Parameter Type="String" Name="CONTACT_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="PRODUCT_BRAND"></asp:Parameter>
</InsertParameters>
<UpdateParameters>
<asp:Parameter Type="String" Name="COMP_CODE"></asp:Parameter>
<asp:Parameter Type="String" Name="COMP_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_CITY"></asp:Parameter>
<asp:Parameter Type="String" Name="INACTIVE"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"></asp:Parameter>
<asp:Parameter Type="String" Name="TELP_NO"></asp:Parameter>
<asp:Parameter Type="String" Name="CONTACT_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="PRODUCT_BRAND"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_COMP_CODE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_COMP_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_CITY"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_INACTIVE"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ADDRESS"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_TELP_NO"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_CONTACT_NAME"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_PRODUCT_BRAND"></asp:Parameter>
300
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_COMP_CODE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_COMP_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_CITY"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_INACTIVE"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ADDRESS"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_TELP_NO"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_CONTACT_NAME"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_PRODUCT_BRAND"></asp:Parameter>
</DeleteParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Db_Province"
SelectCommand="SELECT "ID", "PROV_CODE",
"PROV_NAME", "REGION_ID" FROM
"GNRL_REF_PROVINCE" ORDER BY "PROV_NAME""
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Db_City"
SelectCommand="SELECT "ID", "PROV_ID",
"CITY_CODE", "CITY_NAME",
"POSTAL_CODE", "REGION_ID" FROM
"GNRL_REF_CITY" WHERE ("PROV_ID" = :PROV_ID)
ORDER BY "CITY_NAME"" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"><SelectParameters>
<asp:ControlParameter PropertyName="SelectedValue" Type="Decimal"
DefaultValue="1" Name="PROV_ID"
ControlID="ComProv"></asp:ControlParameter>
</SelectParameters>
</asp:SqlDataSource>
</dx:PanelContent>
</PanelCollection>
<NoHeaderTopEdge BackColor="White">
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif"></Backgroun
dImage>
</NoHeaderTopEdge>
301
</dx:ASPxRoundPanel>
<br />
<!-- ======================== BATAS AKHIR TABLE UTAMA
=========================== -->
 
</div>
</form>
</asp:Content>
Company.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
DevExpress.Web.ASPxPivotGrid;
System.Collections.Generic;
DevExpress.XtraCharts;
CJM.Database.Oracle;
System.Data.OracleClient;
CJM.Reference;
CJM.Project.LGE;
DevExpress.Web.ASPxEditors;
DevExpress.Web.ASPxGridView;
public partial class Administrator_Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_USER_ID"].ToString() == null)
{
Response.Redirect("../Default.aspx");
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string oComCode = ComCode.Text;
string oComName = ComName.Text;
string oComStatus =
ComStatus.SelectedValue;
string oComProv =
ComProv.SelectedValue;
string oComCity =
ComCity.SelectedValue;
string oComAddr = ComAddr.Text;
string oComPhone = ComPhone.Text;
string oComContact = ComContact.Text;
string oComBrand = ComBrand.Text;
302
//---------------------------------------------------------------------//INSERT KE TABLE GNRL_REF_COMPANY
//----------------------------------------------------------------------string myQueryToko = "INSERT INTO
GNRL_REF_COMPANY" +
"
(COMP_CODE,COMP_NAME,INACTIVE, PROV_ID, ID_CITY, ADDRESS, TELP_NO,
CONTACT_NAME, PRODUCT_BRAND)" +
" VALUES(" +
"'" + oComCode +
"'," +
"'" + oComName +
"'," +
"'" + oComStatus
+ "'," +
"'" + oComProv +
"'," +
"'" + oComCity +
"'," +
"'" + oComAddr +
"'," +
"'" + oComPhone +
"'," +
"'" + oComContact
+ "'," +
"'" + oComBrand +
"'" +
")";
bool suksesInsertToko =
ConnOracle.ExecNonQueryConnOra(myQueryToko);
if (suksesInsertToko)
{
ComCode.Text="";
ComName.Text = "";
ComStatus.Text = "";
ComProv.Text = "";
ComCity.Text = "";
ComAddr.Text = "";
ComPhone.Text = "";
ComContact.Text = "";
ComBrand.Text = "";
Alert.Show("Insert
Companyo Success.");
}
else
{
//lblMsg.Text =
"Insert Failed .";
Alert.Show("Insert
Company Failed.");
303
}
}
protected void BtnUpdate_Click(object sender, EventArgs e)
{
Response.Redirect("Company.aspx");
}
}
Default.aspx
<%@ Page Language="C#"
MasterPageFile="../AppModules/MasterPage.master"
AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" Title="Sales Management System" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content_main"
Runat="Server">
<table align="left" width="950" cellpadding="20"
cellspacing="0" style="border-right: gainsboro thin solid; bordertop: gainsboro thin solid; border-left: gainsboro thin solid;
border-bottom: gainsboro thin solid; height: 522px;">
<tr>
<td align="center" valign="top" style="height:
510px">
<br />
<br />
<br />
<asp:Image ID="Image1" runat="server"
ImageUrl="~/images/mainpic.jpg" ImageAlign="AbsMiddle" />
<br />
<br />
<strong><span style="font-size: 24pt; color:
gray"><span style="color: dimgray">
<asp:Label ID="Label1"
runat="server"></asp:Label></span> <span style="color: highlight">
<asp:Label ID="Label2"
runat="server"></asp:Label></span></span></strong></td>
</tr>
</table>
</asp:Content>
Default.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Xml;
304
using System.Text;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_USER_ID"] == null)
{
Response.Redirect("../Default.aspx");
}
else
{
if (Session["SESS_LANG"].ToString() == "indonesia")
{
Label1.Text = "Selamat Datang di";
Label2.Text = " Sales Management System";
}
if (Session["SESS_LANG"].ToString() == "english")
{
Label1.Text = "Welcome ";
Label2.Text = " Sales Management System";
}
}
}
}
GeneralParameter.aspx
<%@ Page Language="C#"
MasterPageFile="../AppModules/MasterPage.master"
AutoEventWireup="true" CodeFile="GeneralParameter.aspx.cs"
Inherits="Administrator_Default2" Title="Untitled Page"
EnableEventValidation="false" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxClasses" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
305
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1" >
<div>
<!-- ======================== TABLE UTAMA
=========================== -->
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
BackColor="White" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
CssPostfix="Aqua" HeaderText="General Parameter"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
Width="200px">
<topedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif"></BackgroundImage>
</topedge>
<leftedge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif"></BackgroundImage>
</leftedge>
<headercontent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headercontent>
<contentpaddings padding="14px"></contentpaddings>
<rightedge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif"></BackgroundImage
>
</rightedge>
<headerrightedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headerrightedge>
<border bordercolor="#AECAF0" borderstyle="Solid"
borderwidth="1px"></border>
<headerstyle backcolor="#E0EDFF">
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></BorderBottom>
</headerstyle>
<headerleftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headerleftedge>
<bottomedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Bottom"
ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif"></BackgroundImag
e>
</bottomedge>
<panelcollection>
<dx:PanelContent runat="server"><asp:Label runat="server"
Width="450px" ID="CaptionUtama"
__designer:dtid="6192449487634440">General Parameter</asp:Label>
<BR /><dx:ASPxPageControl runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
306
CssPostfix="Aqua" ActiveTabIndex="0" Width="900px"
ID="ASPxPageControl1"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css" TabSpacing="3px"
__designer:dtid="6192449487634446"><TabPages
__designer:dtid="6192449487634450">
<dx:TabPage Text="General Parameter"
__designer:dtid="6192449487634451"><ContentCollection
__designer:dtid="6192449487634452">
<dx:ContentControl runat="server"
__designer:dtid="6192449487634453"><asp:Label runat="server"
Width="256px" ForeColor="#00C000" ID="Label_success"
__designer:dtid="6192449487634454"></asp:Label>
<asp:Label runat="server" Width="227px" ForeColor="Red"
ID="Label_error" __designer:dtid="6192449487634455"></asp:Label>
<BR __designer:dtid="6192449487634456" /><dx:ASPxGridView
runat="server" CssPostfix="Aqua" Width="100%" ID="ASPxGridView1"
DataSourceID="GeneralParameter" KeyFieldName="ID"
AutoGenerateColumns="False"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
__designer:dtid="6192449487634457"
OnRowUpdating="ASPxGridView1_RowUpdating"
OnRowInserting="ASPxGridView1_RowInserting">
<SettingsDetail ShowDetailRow="True"
__designer:dtid="6192449487634499"></SettingsDetail>
<Images SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:dtid="6192449487634460">
<LoadingPanelOnStatusBar
Url="~/App_Themes/Aqua/GridView/gvLoadingOnStatusBar.gif"
__designer:dtid="6192449487634461"></LoadingPanelOnStatusBar>
<LoadingPanel Url="~/App_Themes/Aqua/GridView/Loading.gif"
__designer:dtid="6192449487634462"></LoadingPanel>
</Images>
<Templates __designer:dtid="6192449487634500"><DetailRow
__designer:dtid="6192449487634501">
<asp:Label __designer:dtid="6192449487634502"
ID="Label_error_detail" runat="server" ForeColor="Red"
Width="200px"></asp:Label>
<asp:Label __designer:dtid="6192449487634503"
ID="Label_success_detail" runat="server" ForeColor="LimeGreen"
Width="213px"></asp:Label><br __designer:dtid="6192449487634504"
/>
<dx:ASPxGridView __designer:dtid="6192449487634505"
ID="ASPxGridView3" runat="server" DataSourceID="SqlDataSource1"
AutoGenerateColumns="False" KeyFieldName="ID"
OnBeforePerformDataSelect="ASPxGridView3_BeforePerformDataSelect"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
CssPostfix="Office2003Olive"
OnRowInserting="ASPxGridView3_RowInserting"
OnRowUpdating="ASPxGridView3_RowUpdating">
<Columns __designer:dtid="6192449487634506">
<dx:GridViewCommandColumn
__designer:dtid="6192449487634507" VisibleIndex="0">
<EditButton __designer:dtid="6192449487634508"
Visible="True">
307
</EditButton>
<NewButton __designer:dtid="6192449487634509"
Visible="True">
</NewButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn
__designer:dtid="6192449487634510" FieldName="ID" ReadOnly="True"
Visible="False" VisibleIndex="1">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn
__designer:dtid="6192449487634511" Caption="Parameter Code"
FieldName="PARAMETER_CODE" VisibleIndex="1">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn
__designer:dtid="6192449487634512" Caption="Parameter Value"
FieldName="PARAMETER_VALUE"
VisibleIndex="2">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn
__designer:dtid="6192449487634513" FieldName="PAR_ID"
ReadOnly="True" Visible="False" VisibleIndex="3">
<EditFormSettings
__designer:dtid="6192449487634514" Visible="False" />
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn
__designer:dtid="6192449487634515" Caption="Start Value"
FieldName="START_VALUE" VisibleIndex="3">
<PropertiesTextEdit
__designer:dtid="6192449487634516"
ConvertEmptyStringToNull="False">
</PropertiesTextEdit>
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn
__designer:dtid="6192449487634517" Caption="End Value"
FieldName="END_VALUE" VisibleIndex="4">
<PropertiesTextEdit
__designer:dtid="6192449487634518"
ConvertEmptyStringToNull="False">
</PropertiesTextEdit>
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn
__designer:dtid="6192449487634519" FieldName="INPUT_BY"
Visible="False" VisibleIndex="6">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn
__designer:dtid="6192449487634520" FieldName="UPDATE_BY"
Visible="False" VisibleIndex="6">
</dx:GridViewDataTextColumn>
</Columns>
<SettingsDetail __designer:dtid="6192449487634521"
IsDetailGrid="True" />
<Styles __designer:dtid="6192449487634522"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
CssPostfix="Office2003Olive">
<Header __designer:dtid="6192449487634523"
ImageSpacing="5px" SortingImageSpacing="5px">
</Header>
<LoadingPanel __designer:dtid="6192449487634524"
ImageSpacing="10px">
308
</LoadingPanel>
</Styles>
<ImagesFilterControl __designer:dtid="6192449487634525">
<LoadingPanel __designer:dtid="6192449487634526"
Url="~/App_Themes/Office2003Olive/Editors/Loading.gif">
</LoadingPanel>
</ImagesFilterControl>
<Images __designer:dtid="6192449487634527"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css">
<LoadingPanelOnStatusBar
__designer:dtid="6192449487634528"
Url="~/App_Themes/Office2003Olive/GridView/gvLoadingOnStatusBar.gi
f">
</LoadingPanelOnStatusBar>
<LoadingPanel __designer:dtid="6192449487634529"
Url="~/App_Themes/Office2003Olive/GridView/Loading.gif">
</LoadingPanel>
</Images>
<SettingsEditing __designer:dtid="6192449487634530"
PopupEditFormHorizontalAlign="Center"
PopupEditFormVerticalAlign="TopSides"
PopupEditFormWidth="500px" />
<StylesEditors __designer:dtid="6192449487634531">
<ProgressBar __designer:dtid="6192449487634532"
Height="25px">
</ProgressBar>
</StylesEditors>
</dx:ASPxGridView>
</DetailRow>
</Templates>
<SettingsEditing PopupEditFormHeight="300px"
PopupEditFormModal="True" PopupEditFormWidth="500px"
Mode="PopupEditForm"
__designer:dtid="6192449487634498"></SettingsEditing>
<ImagesFilterControl __designer:dtid="6192449487634474">
<LoadingPanel Url="~/App_Themes/Aqua/Editors/Loading.gif"
__designer:dtid="6192449487634475"></LoadingPanel>
</ImagesFilterControl>
<Styles CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
__designer:dtid="6192449487634476">
<LoadingPanel ImageSpacing="8px"
__designer:dtid="6192449487634477"></LoadingPanel>
</Styles>
<ImagesEditors __designer:dtid="6192449487634463">
<SpinEditLargeIncrement __designer:dtid="6192449487634470">
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeIncImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeIncImagePressed_Aqua"
__designer:dtid="6192449487634471"></SpriteProperties>
</SpinEditLargeIncrement>
<SpinEditLargeDecrement __designer:dtid="6192449487634472">
309
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeDecImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeDecImagePressed_Aqua"
__designer:dtid="6192449487634473"></SpriteProperties>
</SpinEditLargeDecrement>
<SpinEditIncrement __designer:dtid="6192449487634466">
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditIncrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditIncrementImagePressed_Aqua"
__designer:dtid="6192449487634467"></SpriteProperties>
</SpinEditIncrement>
<SpinEditDecrement __designer:dtid="6192449487634468">
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditDecrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditDecrementImagePressed_Aqua"
__designer:dtid="6192449487634469"></SpriteProperties>
</SpinEditDecrement>
<DropDownEditDropDown __designer:dtid="6192449487634464">
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"
__designer:dtid="6192449487634465"></SpriteProperties>
</DropDownEditDropDown>
</ImagesEditors>
<Settings ShowGroupPanel="True" ShowFilterRow="True"
__designer:dtid="6192449487634458"></Settings>
<StylesEditors __designer:dtid="6192449487634478">
<CalendarHeader Spacing="1px"
__designer:dtid="6192449487634479"></CalendarHeader>
<ProgressBar Height="25px"
__designer:dtid="6192449487634480"></ProgressBar>
</StylesEditors>
<Columns __designer:dtid="6192449487634481">
<dx:GridViewCommandColumn VisibleIndex="0"
__designer:dtid="6192449487634482">
<NewButton Visible="True"
__designer:dtid="6192449487634484"></NewButton>
<EditButton Visible="True"
__designer:dtid="6192449487634483"></EditButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn Visible="False" ReadOnly="True"
VisibleIndex="0" FieldName="ID"
__designer:dtid="6192449487634485"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="1"
FieldName="PARAMETER_NAME" Caption="Parameter Name"
__designer:dtid="6192449487634486"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2"
FieldName="PARAMETER_DESC" Caption="Parameter Description"
__designer:dtid="6192449487634487"></dx:GridViewDataTextColumn>
<dx:GridViewDataComboBoxColumn FieldName="INACTIVE"
Caption="Inactive" VisibleIndex="3"
__designer:dtid="6192449487634488">
310
<PropertiesComboBox ValueType="System.String"
__designer:dtid="6192449487634489"><Items
__designer:dtid="6192449487634490">
<dx:ListEditItem Value="N" Text="N" Selected="True"
__designer:dtid="6192449487634491"></dx:ListEditItem>
<dx:ListEditItem Value="Y" Text="Y"
__designer:dtid="6192449487634492"></dx:ListEditItem>
</Items>
</PropertiesComboBox>
</dx:GridViewDataComboBoxColumn>
<dx:GridViewDataDateColumn Visible="False" VisibleIndex="3"
FieldName="INPUT_DATE"
__designer:dtid="6192449487634493"></dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn Visible="False" VisibleIndex="3"
FieldName="INPUT_BY"
__designer:dtid="6192449487634494"></dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn Visible="False" VisibleIndex="3"
FieldName="UPDATE_DATE"
__designer:dtid="6192449487634495"></dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn Visible="False" VisibleIndex="3"
FieldName="UPDATE_BY"
__designer:dtid="6192449487634496"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn Visible="False" VisibleIndex="3"
FieldName="COMP_ID"
__designer:dtid="6192449487634497"></dx:GridViewDataTextColumn>
</Columns>
<SettingsLoadingPanel ImagePosition="Top"
__designer:dtid="6192449487634459"></SettingsLoadingPanel>
</dx:ASPxGridView>
 <BR __designer:dtid="6192449487634533"
/></dx:ContentControl>
</ContentCollection>
</dx:TabPage>
</TabPages>
<LoadingPanelImage Url="~/App_Themes/Aqua/Web/Loading.gif"
__designer:dtid="6192449487634447"></LoadingPanelImage>
<ContentStyle __designer:dtid="6192449487634448">
<Border BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0" __designer:dtid="6192449487634449"></Border>
</ContentStyle>
<Paddings Padding="2px" PaddingRight="5px" PaddingLeft="5px"
__designer:dtid="6192449487634534"></Paddings>
</dx:ASPxPageControl>
<asp:SqlDataSource runat="server" ID="SqlDataSource1"
SelectCommand="SELECT "ID", "PARAMETER_CODE",
"PARAMETER_VALUE", "PAR_ID",
"START_VALUE", "END_VALUE",
"INPUT_BY", "UPDATE_BY" FROM
"GNRL_PARAMETER_VALUE" WHERE ("PAR_ID" =
:PAR_ID) ORDER BY "PARAMETER_VALUE""
OldValuesParameterFormatString="original_{0}"
ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM
"GNRL_PARAMETER_VALUE" WHERE "ID" =
:original_ID AND (("PARAMETER_CODE" =
311
:original_PARAMETER_CODE) OR ("PARAMETER_CODE" IS NULL
AND :original_PARAMETER_CODE IS NULL)) AND
(("PARAMETER_VALUE" = :original_PARAMETER_VALUE) OR
("PARAMETER_VALUE" IS NULL AND :original_PARAMETER_VALUE
IS NULL)) AND (("PAR_ID" = :original_PAR_ID) OR
("PAR_ID" IS NULL AND :original_PAR_ID IS NULL)) AND
(("START_VALUE" = :original_START_VALUE) OR
("START_VALUE" IS NULL AND :original_START_VALUE IS
NULL)) AND (("END_VALUE" = :original_END_VALUE) OR
("END_VALUE" IS NULL AND :original_END_VALUE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
(("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))"
InsertCommand="INSERT INTO "GNRL_PARAMETER_VALUE"
("ID", "PARAMETER_CODE",
"PARAMETER_VALUE", "PAR_ID",
"START_VALUE", "END_VALUE",
"INPUT_BY", "UPDATE_BY") VALUES (:ID,
:PARAMETER_CODE, :PARAMETER_VALUE, :PAR_ID, :START_VALUE,
:END_VALUE, :INPUT_BY, :UPDATE_BY)" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
UpdateCommand="UPDATE "GNRL_PARAMETER_VALUE" SET
"PARAMETER_CODE" = :PARAMETER_CODE,
"PARAMETER_VALUE" = :PARAMETER_VALUE, "PAR_ID"
= :PAR_ID, "START_VALUE" = :START_VALUE,
"END_VALUE" = :END_VALUE, "INPUT_BY" =
:INPUT_BY, "UPDATE_BY" = :UPDATE_BY WHERE "ID"
= :original_ID AND (("PARAMETER_CODE" =
:original_PARAMETER_CODE) OR ("PARAMETER_CODE" IS NULL
AND :original_PARAMETER_CODE IS NULL)) AND
(("PARAMETER_VALUE" = :original_PARAMETER_VALUE) OR
("PARAMETER_VALUE" IS NULL AND :original_PARAMETER_VALUE
IS NULL)) AND (("PAR_ID" = :original_PAR_ID) OR
("PAR_ID" IS NULL AND :original_PAR_ID IS NULL)) AND
(("START_VALUE" = :original_START_VALUE) OR
("START_VALUE" IS NULL AND :original_START_VALUE IS
NULL)) AND (("END_VALUE" = :original_END_VALUE) OR
("END_VALUE" IS NULL AND :original_END_VALUE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
(("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))"
__designer:dtid="6192449487634539"><InsertParameters
__designer:dtid="6192449487634567">
<asp:Parameter Type="Decimal" Name="ID"
__designer:dtid="6192449487634568"></asp:Parameter>
<asp:Parameter Type="String" Name="PARAMETER_CODE"
__designer:dtid="6192449487634569"></asp:Parameter>
<asp:Parameter Type="String" Name="PARAMETER_VALUE"
__designer:dtid="6192449487634570"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PAR_ID"
__designer:dtid="6192449487634571"></asp:Parameter>
<asp:Parameter Type="String" Name="START_VALUE"
__designer:dtid="6192449487634572"></asp:Parameter>
<asp:Parameter Type="String" Name="END_VALUE"
__designer:dtid="6192449487634573"></asp:Parameter>
312
<asp:Parameter Type="Decimal" Name="INPUT_BY"
__designer:dtid="6192449487634574"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"
__designer:dtid="6192449487634575"></asp:Parameter>
</InsertParameters>
<SelectParameters __designer:dtid="6192449487634540">
<asp:SessionParameter SessionField="ID" Type="Decimal"
Name="PAR_ID"
__designer:dtid="6192449487634541"></asp:SessionParameter>
</SelectParameters>
<UpdateParameters __designer:dtid="6192449487634551">
<asp:Parameter Type="String" Name="PARAMETER_CODE"
__designer:dtid="6192449487634552"></asp:Parameter>
<asp:Parameter Type="String" Name="PARAMETER_VALUE"
__designer:dtid="6192449487634553"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PAR_ID"
__designer:dtid="6192449487634554"></asp:Parameter>
<asp:Parameter Type="String" Name="START_VALUE"
__designer:dtid="6192449487634555"></asp:Parameter>
<asp:Parameter Type="String" Name="END_VALUE"
__designer:dtid="6192449487634556"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"
__designer:dtid="6192449487634557"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"
__designer:dtid="6192449487634558"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_ID"
__designer:dtid="6192449487634559"></asp:Parameter>
<asp:Parameter Type="String" Name="original_PARAMETER_CODE"
__designer:dtid="6192449487634560"></asp:Parameter>
<asp:Parameter Type="String" Name="original_PARAMETER_VALUE"
__designer:dtid="6192449487634561"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_PAR_ID"
__designer:dtid="6192449487634562"></asp:Parameter>
<asp:Parameter Type="String" Name="original_START_VALUE"
__designer:dtid="6192449487634563"></asp:Parameter>
<asp:Parameter Type="String" Name="original_END_VALUE"
__designer:dtid="6192449487634564"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_INPUT_BY"
__designer:dtid="6192449487634565"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_UPDATE_BY"
__designer:dtid="6192449487634566"></asp:Parameter>
</UpdateParameters>
<DeleteParameters __designer:dtid="6192449487634542">
<asp:Parameter Type="Decimal" Name="original_ID"
__designer:dtid="6192449487634543"></asp:Parameter>
<asp:Parameter Type="String" Name="original_PARAMETER_CODE"
__designer:dtid="6192449487634544"></asp:Parameter>
<asp:Parameter Type="String" Name="original_PARAMETER_VALUE"
__designer:dtid="6192449487634545"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_PAR_ID"
__designer:dtid="6192449487634546"></asp:Parameter>
<asp:Parameter Type="String" Name="original_START_VALUE"
__designer:dtid="6192449487634547"></asp:Parameter>
<asp:Parameter Type="String" Name="original_END_VALUE"
__designer:dtid="6192449487634548"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_INPUT_BY"
__designer:dtid="6192449487634549"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_UPDATE_BY"
__designer:dtid="6192449487634550"></asp:Parameter>
313
</DeleteParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="GeneralParameterValue"
SelectCommand="SELECT "PARAMETER_NAME", "ID",
"PARAMETER_CODE", "START_VALUE",
"END_VALUE", "PAR_ID",
"PARAMETER_VALUE" FROM
"EMP_GNRL_PARAMETER_VIEW" ORDER BY
"PARAMETER_NAME""
OldValuesParameterFormatString="original_{0}"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" __designer:dtid="6192449487634538"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="GeneralParameter"
SelectCommand="SELECT "ID", "PARAMETER_NAME",
"PARAMETER_DESC", "INACTIVE",
"INPUT_DATE", "INPUT_BY",
"UPDATE_DATE", "UPDATE_BY",
"COMP_ID" FROM "GNRL_PARAMETER" WHERE
("INACTIVE" = :INACTIVE) ORDER BY "INPUT_DATE"
DESC" OldValuesParameterFormatString="original_{0}"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" __designer:dtid="6192449487634535"><SelectParameters
__designer:dtid="6192449487634536">
<asp:Parameter Type="String" DefaultValue="N" Name="INACTIVE"
__designer:dtid="6192449487634537"></asp:Parameter>
</SelectParameters>
</asp:SqlDataSource>
</dx:PanelContent>
</panelcollection>
<noheadertopedge backcolor="White">
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif"></Backgroun
dImage>
</noheadertopedge>
</dx:ASPxRoundPanel><br />
<!-- ======================== BATAS AKHIR TABLE UTAMA
=========================== -->
 </div>
</form>
</asp:Content>
GeneralParameter.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
DevExpress.Web.ASPxPivotGrid;
System.Collections.Generic;
314
using
using
using
using
using
using
using
DevExpress.XtraCharts;
CJM.Database.Oracle;
System.Data.OracleClient;
CJM.Reference;
CJM.Project.LGE;
DevExpress.Web.ASPxEditors;
DevExpress.Web.ASPxGridView;
public partial class Administrator_Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_USER_ID"].ToString() == null)
{
Response.Redirect("../LogOut.aspx");
}
}
protected void ASPxGridView1_RowInserting(object sender,
DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
{
string oPARAMETER_NAME =
e.NewValues["PARAMETER_NAME"].ToString();
string oPARAMETER_DESC =
e.NewValues["PARAMETER_DESC"].ToString();
string oINACTIVE = e.NewValues["INACTIVE"].ToString();
string myQueryInsert = "INSERT INTO GNRL_PARAMETER" +
"
(PARAMETER_NAME,PARAMETER_DESC,INACTIVE,INPUT_BY,UPDATE_BY,COMP_ID
)" +
" VALUES(" +
"'" + oPARAMETER_NAME + "'," +
"'" + oPARAMETER_DESC + "'," +
"'" + oINACTIVE + "'," +
"'" + Session["SESS_USER_ID"] + "',"
+
"'" + Session["SESS_USER_ID"] + "',"
+
"'" + Session["SESS_COMP_ID"] + "'" +
")";
bool suksesInsert =
ConnOracle.ExecNonQueryConnOra(myQueryInsert);
if (suksesInsert)
{
Label_success.Text = "Insert Parameter success.";
e.Cancel = true;
ASPxGridView1.CancelEdit();
}
else
{
Label_error.Text = "Insert Parameter Failed.";
}
315
}
protected void ASPxGridView1_RowUpdating(object sender,
DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
{
string oPARAMETER_NAME =
e.NewValues["PARAMETER_NAME"].ToString();
string oPARAMETER_DESC =
e.NewValues["PARAMETER_DESC"].ToString();
string oINACTIVE = e.NewValues["INACTIVE"].ToString();
string oID = e.Keys["ID"].ToString();
string myQueryUpdate = "UPDATE GNRL_PARAMETER SET " +
"PARAMETER_NAME
= '" +
oPARAMETER_NAME + "'," +
"PARAMETER_DESC
= '" +
oPARAMETER_DESC + "'," +
"INACTIVE
= '" + oINACTIVE +
"'," +
"UPDATE_BY
= '" +
Session["SESS_USER_ID"] + "'," +
"COMP_ID
= '" +
Session["SESS_COMP_ID"] + "'"+
" WHERE ID
= '" + oID + "'";
bool suksesUpdate =
ConnOracle.ExecNonQueryConnOra(myQueryUpdate);
if (suksesUpdate)
{
Label_success.Text = "Insert Parameter success.";
e.Cancel = true;
ASPxGridView1.CancelEdit();
}
else
{
Label_error.Text = "Insert Parameter Failed.";
}
}
protected void ASPxGridView3_BeforePerformDataSelect(object
sender, EventArgs e)
{
Session["ID"] = (sender as
ASPxGridView).GetMasterRowKeyValue();
}
protected void ASPxGridView3_RowInserting(object sender,
DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
{
string oPARAMETER_VALUE =
e.NewValues["PARAMETER_VALUE"].ToString();
string oPARAMETER_CODE =
e.NewValues["PARAMETER_CODE"].ToString();
string oSTART_VALUE =
e.NewValues["START_VALUE"].ToString();
string oEND_VALUE = e.NewValues["END_VALUE"].ToString();
316
string myQueryInsertx = "INSERT INTO GNRL_PARAMETER_VALUE"
+
" (PARAMETER_CODE,
PARAMETER_VALUE,PAR_ID,START_VALUE, END_VALUE,
INPUT_BY,UPDATE_BY)" +
" VALUES(" +
"'" + oPARAMETER_CODE + "'," +
"'" + oPARAMETER_VALUE + "'," +
"'" + Session["ID"] + "'," +
"'" + oSTART_VALUE + "'," +
"'" + oEND_VALUE + "'," +
"'" + Session["SESS_USER_ID"] + "',"
+
"'" + Session["SESS_USER_ID"] + "'" +
")";
bool suksesInsertx =
ConnOracle.ExecNonQueryConnOra(myQueryInsertx);
if (suksesInsertx)
{
Label_success.Text = "Insert Parameter Value
success.";
e.Cancel = true;
ASPxGridView1.CancelEdit();
}
else
{
Label_error.Text = "Insert Parameter Value Failed.";
e.Cancel = true;
ASPxGridView1.CancelEdit();
}
}
protected void ASPxGridView3_RowUpdating(object sender,
DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
{
}
}
Mall.aspx
<%@ Page Language="C#"
MasterPageFile="../AppModules/MasterPage.master"
AutoEventWireup="true" CodeFile="Mall.aspx.cs"
Inherits="Administrator_Default2" Title="Untitled Page"
EnableEventValidation="false" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
317
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxClasses" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
<div>
<!-- ======================== TABLE UTAMA
=========================== -->
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
BackColor="White" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
CssPostfix="Aqua" HeaderText="Master Mall"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
Width="200px">
<topedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif"></BackgroundImage>
</topedge>
<leftedge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif"></BackgroundImage>
</leftedge>
<headercontent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headercontent>
<contentpaddings padding="14px"></contentpaddings>
<rightedge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif"></BackgroundImage
>
</rightedge>
<headerrightedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headerrightedge>
<border bordercolor="#AECAF0" borderstyle="Solid"
borderwidth="1px"></border>
<headerstyle backcolor="#E0EDFF">
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></BorderBottom>
</headerstyle>
318
<headerleftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headerleftedge>
<bottomedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Bottom"
ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif"></BackgroundImag
e>
</bottomedge>
<panelcollection>
<dx:PanelContent runat="server"><asp:Label runat="server"
Width="450px" ID="CaptionUtama"
__designer:dtid="6473924464345096">Master Mall</asp:Label>
<BR /><TABLE width=900
__designer:dtid="6473924464345099"><TBODY><TR
__designer:dtid="6473924464345100"><TD style="WIDTH: 100px;
HEIGHT: 26px" __designer:dtid="6473924464345101">Code</TD><TD
style="WIDTH: 6px; HEIGHT: 26px"
__designer:dtid="6473924464345102">:</TD><TD style="WIDTH: 827px;
HEIGHT: 26px" __designer:dtid="6473924464345103"><asp:TextBox
runat="server" ID="MallCode"
__designer:dtid="6473924464345104"></asp:TextBox>
</TD></TR><TR __designer:dtid="6473924464345105"><TD
style="WIDTH: 100px"
__designer:dtid="6473924464345106">Name</TD><TD style="WIDTH: 6px"
__designer:dtid="6473924464345107">:</TD><TD style="WIDTH: 827px"
__designer:dtid="6473924464345108"><asp:TextBox runat="server"
ID="MallName" __designer:dtid="6473924464345109"></asp:TextBox>
</TD></TR><TR __designer:dtid="6473924464345110"><TD
style="WIDTH: 100px; HEIGHT: 16px"
__designer:dtid="6473924464345111">Address</TD><TD style="WIDTH:
6px; HEIGHT: 16px" __designer:dtid="6473924464345112">:</TD><TD
style="WIDTH: 827px; HEIGHT: 16px"
__designer:dtid="6473924464345113"><asp:TextBox runat="server"
ID="MallAddr" TextMode="MultiLine"
__designer:dtid="6473924464345114"></asp:TextBox>
</TD></TR><TR __designer:dtid="6473924464345115"><TD
style="WIDTH: 100px; HEIGHT: 24px"
__designer:dtid="6473924464345116">Province</TD><TD style="WIDTH:
6px; HEIGHT: 24px" __designer:dtid="6473924464345117">:</TD><TD
style="WIDTH: 827px; HEIGHT: 24px"
__designer:dtid="6473924464345118"><asp:DropDownList
runat="server" DataSourceID="Db_Province" AutoPostBack="True"
DataValueField="ID" ID="MallProv" DataTextField="PROV_NAME"
__designer:dtid="6473924464345119"></asp:DropDownList>
</TD></TR><TR __designer:dtid="6473924464345120"><TD
style="WIDTH: 100px; HEIGHT: 22px"
__designer:dtid="6473924464345121">City</TD><TD style="WIDTH: 6px;
HEIGHT: 22px" __designer:dtid="6473924464345122">:</TD><TD
style="WIDTH: 827px; HEIGHT: 22px"
__designer:dtid="6473924464345123"><asp:DropDownList
runat="server" DataSourceID="Db_City" DataValueField="ID"
ID="MallCity" DataTextField="CITY_NAME"
__designer:dtid="6473924464345124"></asp:DropDownList>
</TD></TR><TR __designer:dtid="6473924464345125"><TD
style="WIDTH: 100px"
__designer:dtid="6473924464345126">Phone</TD><TD style="WIDTH:
6px" __designer:dtid="6473924464345127">:</TD><TD style="WIDTH:
319
827px" __designer:dtid="6473924464345128"><asp:TextBox
runat="server" ID="MallPhone"
__designer:dtid="6473924464345129"></asp:TextBox>
</TD></TR><TR __designer:dtid="6473924464345130"><TD
style="WIDTH: 100px; HEIGHT: 71px"
__designer:dtid="6473924464345131">Status</TD><TD style="WIDTH:
6px; HEIGHT: 71px" __designer:dtid="6473924464345132">:</TD><TD
style="WIDTH: 827px; HEIGHT: 71px"
__designer:dtid="6473924464345133"><asp:CheckBoxList
runat="server" ID="MallStatus"
__designer:dtid="6473924464345134"><asp:ListItem Value="Y"
__designer:dtid="6473924464345135">Active</asp:ListItem>
<asp:ListItem Value="N"
__designer:dtid="6473924464345136">Inactive</asp:ListItem>
</asp:CheckBoxList>
</TD></TR><TR __designer:dtid="6473924464345137"><TD
style="WIDTH: 100px; HEIGHT: 24px"
__designer:dtid="6473924464345138">Company</TD><TD style="WIDTH:
6px; HEIGHT: 24px" __designer:dtid="6473924464345139">:</TD><TD
style="WIDTH: 827px; HEIGHT: 24px"
__designer:dtid="6473924464345140"><asp:DropDownList
runat="server" DataSourceID="Db_Company" DataValueField="ID"
ID="MallCompany" DataTextField="COMP_NAME"
__designer:dtid="6473924464345141"></asp:DropDownList>
</TD></TR><TR __designer:dtid="6473924464345142"><TD
style="WIDTH: 100px" __designer:dtid="6473924464345143"></TD><TD
style="WIDTH: 6px" __designer:dtid="6473924464345144"></TD><TD
style="WIDTH: 827px"
__designer:dtid="6473924464345145"><asp:Button runat="server"
ID="BtnSave_Mall" Width="56px" Text="Save"
__designer:dtid="6473924464345146"
OnClick="BtnSave_Mall_Click"></asp:Button>
 <asp:Button runat="server" ID="BtnCancel_Mall"
Text="Cancel" __designer:dtid="6473924464345147"
OnClick="BtnCancel_Mall_Click"></asp:Button>
</TD></TR><TR __designer:dtid="6473924464345148"><TD colSpan=3
__designer:dtid="6473924464345149">
<HR color=cornflowerblue __designer:dtid="6473924464345150" />
</TD></TR><TR __designer:dtid="6473924464345151"><TD
style="HEIGHT: 233px" vAlign=top colSpan=3
__designer:dtid="6473924464345152"><dx:ASPxGridView runat="server"
CssPostfix="Aqua" Width="850px" ID="ASPxGridView1"
DataSourceID="Db_Mall" KeyFieldName="ID"
AutoGenerateColumns="False"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
__designer:dtid="6473924464345153">
<Images SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
__designer:dtid="6473924464345173">
<LoadingPanelOnStatusBar
Url="~/App_Themes/Aqua/GridView/gvLoadingOnStatusBar.gif"
__designer:dtid="6473924464345174"></LoadingPanelOnStatusBar>
<LoadingPanel Url="~/App_Themes/Aqua/GridView/Loading.gif"
__designer:dtid="6473924464345175"></LoadingPanel>
</Images>
<ImagesFilterControl __designer:dtid="6473924464345187">
<LoadingPanel Url="~/App_Themes/Aqua/Editors/Loading.gif"
__designer:dtid="6473924464345188"></LoadingPanel>
320
</ImagesFilterControl>
<Styles CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
__designer:dtid="6473924464345189">
<LoadingPanel ImageSpacing="8px"
__designer:dtid="6473924464345190"></LoadingPanel>
</Styles>
<ImagesEditors __designer:dtid="6473924464345176">
<SpinEditLargeIncrement __designer:dtid="6473924464345183">
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeIncImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeIncImagePressed_Aqua"
__designer:dtid="6473924464345184"></SpriteProperties>
</SpinEditLargeIncrement>
<SpinEditLargeDecrement __designer:dtid="6473924464345185">
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeDecImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeDecImagePressed_Aqua"
__designer:dtid="6473924464345186"></SpriteProperties>
</SpinEditLargeDecrement>
<SpinEditIncrement __designer:dtid="6473924464345179">
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditIncrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditIncrementImagePressed_Aqua"
__designer:dtid="6473924464345180"></SpriteProperties>
</SpinEditIncrement>
<SpinEditDecrement __designer:dtid="6473924464345181">
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditDecrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditDecrementImagePressed_Aqua"
__designer:dtid="6473924464345182"></SpriteProperties>
</SpinEditDecrement>
<DropDownEditDropDown __designer:dtid="6473924464345177">
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"
__designer:dtid="6473924464345178"></SpriteProperties>
</DropDownEditDropDown>
</ImagesEditors>
<Settings ShowFilterRow="True"
__designer:dtid="6473924464345171"></Settings>
<StylesEditors __designer:dtid="6473924464345191">
<CalendarHeader Spacing="1px"
__designer:dtid="6473924464345192"></CalendarHeader>
<ProgressBar Height="25px"
__designer:dtid="6473924464345193"></ProgressBar>
</StylesEditors>
<Columns __designer:dtid="6473924464345154">
<dx:GridViewCommandColumn VisibleIndex="0"
__designer:dtid="6473924464345155">
321
<DeleteButton Visible="True"
__designer:dtid="6473924464345157"></DeleteButton>
<EditButton Visible="True"
__designer:dtid="6473924464345156"></EditButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn ReadOnly="True" VisibleIndex="1"
FieldName="ID"
__designer:dtid="6473924464345158"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2" FieldName="MALL_CODE"
__designer:dtid="6473924464345159"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3" FieldName="PROV_ID"
__designer:dtid="6473924464345160"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4" FieldName="MALL_NAME"
__designer:dtid="6473924464345161"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="5" FieldName="ADDRESS"
__designer:dtid="6473924464345162"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="6" FieldName="CITY_ID"
__designer:dtid="6473924464345163"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="7" FieldName="TELP_NO"
__designer:dtid="6473924464345164"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="8" FieldName="INACTIVE"
__designer:dtid="6473924464345165"></dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn VisibleIndex="9" FieldName="INPUT_DATE"
__designer:dtid="6473924464345166"></dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn VisibleIndex="10" FieldName="INPUT_BY"
__designer:dtid="6473924464345167"></dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn VisibleIndex="11"
FieldName="UPDATE_DATE"
__designer:dtid="6473924464345168"></dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn VisibleIndex="12" FieldName="UPDATE_BY"
__designer:dtid="6473924464345169"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="13" FieldName="COMP_ID"
__designer:dtid="6473924464345170"></dx:GridViewDataTextColumn>
</Columns>
<SettingsLoadingPanel ImagePosition="Top"
__designer:dtid="6473924464345172"></SettingsLoadingPanel>
</dx:ASPxGridView>
</TD></TR></TBODY></TABLE><asp:SqlDataSource runat="server"
ID="Db_City" SelectCommand="SELECT * FROM
"GNRL_REF_CITY" WHERE ("PROV_ID" = :PROV_ID)"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" __designer:dtid="6473924464345194"><SelectParameters
__designer:dtid="6473924464345195">
<asp:ControlParameter PropertyName="SelectedValue" Type="Decimal"
DefaultValue="1" Name="PROV_ID" ControlID="MallProv"
__designer:dtid="6473924464345196"></asp:ControlParameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Db_Province"
SelectCommand="SELECT * FROM "GNRL_REF_PROVINCE""
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" __designer:dtid="6473924464345197"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Db_Company"
SelectCommand="SELECT "ID", "COMP_NAME" FROM
"GNRL_REF_COMPANY"" ConnectionString="<%$
322
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
__designer:dtid="6473924464345198"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Db_Mall"
SelectCommand="SELECT * FROM "GNRL_REF_MALL""
DeleteCommand="DELETE FROM "GNRL_REF_MALL" WHERE
"ID" = :ID" InsertCommand="INSERT INTO
"GNRL_REF_MALL" ("ID", "MALL_CODE",
"PROV_ID", "MALL_NAME", "ADDRESS",
"POSTAL_CODE", "CITY_ID", "TELP_NO",
"INACTIVE", "INPUT_DATE",
"INPUT_BY", "UPDATE_DATE",
"UPDATE_BY", "COMP_ID") VALUES (:ID,
:MALL_CODE, :PROV_ID, :MALL_NAME, :ADDRESS, :POSTAL_CODE,
:CITY_ID, :TELP_NO, :INACTIVE, :INPUT_DATE, :INPUT_BY,
:UPDATE_DATE, :UPDATE_BY, :COMP_ID)" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
UpdateCommand="UPDATE "GNRL_REF_MALL" SET
"MALL_CODE" = :MALL_CODE, "PROV_ID" =
:PROV_ID, "MALL_NAME" = :MALL_NAME, "ADDRESS"
= :ADDRESS, "POSTAL_CODE" = :POSTAL_CODE,
"CITY_ID" = :CITY_ID, "TELP_NO" = :TELP_NO,
"INACTIVE" = :INACTIVE, "INPUT_DATE" =
:INPUT_DATE, "INPUT_BY" = :INPUT_BY,
"UPDATE_DATE" = :UPDATE_DATE, "UPDATE_BY" =
:UPDATE_BY, "COMP_ID" = :COMP_ID WHERE "ID" =
:ID" __designer:dtid="6473924464345199"><InsertParameters
__designer:dtid="6473924464345202">
<asp:Parameter Type="Decimal" Name="ID"
__designer:dtid="6473924464345203"></asp:Parameter>
<asp:Parameter Type="String" Name="MALL_CODE"
__designer:dtid="6473924464345204"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"
__designer:dtid="6473924464345205"></asp:Parameter>
<asp:Parameter Type="String" Name="MALL_NAME"
__designer:dtid="6473924464345206"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"
__designer:dtid="6473924464345207"></asp:Parameter>
<asp:Parameter Type="String" Name="POSTAL_CODE"
__designer:dtid="6473924464345208"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="CITY_ID"
__designer:dtid="6473924464345209"></asp:Parameter>
<asp:Parameter Type="String" Name="TELP_NO"
__designer:dtid="6473924464345210"></asp:Parameter>
<asp:Parameter Type="String" Name="INACTIVE"
__designer:dtid="6473924464345211"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"
__designer:dtid="6473924464345212"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"
__designer:dtid="6473924464345213"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"
__designer:dtid="6473924464345214"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"
__designer:dtid="6473924464345215"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"
__designer:dtid="6473924464345216"></asp:Parameter>
</InsertParameters>
<UpdateParameters __designer:dtid="6473924464345217">
323
<asp:Parameter Type="String" Name="MALL_CODE"
__designer:dtid="6473924464345218"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"
__designer:dtid="6473924464345219"></asp:Parameter>
<asp:Parameter Type="String" Name="MALL_NAME"
__designer:dtid="6473924464345220"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"
__designer:dtid="6473924464345221"></asp:Parameter>
<asp:Parameter Type="String" Name="POSTAL_CODE"
__designer:dtid="6473924464345222"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="CITY_ID"
__designer:dtid="6473924464345223"></asp:Parameter>
<asp:Parameter Type="String" Name="TELP_NO"
__designer:dtid="6473924464345224"></asp:Parameter>
<asp:Parameter Type="String" Name="INACTIVE"
__designer:dtid="6473924464345225"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"
__designer:dtid="6473924464345226"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"
__designer:dtid="6473924464345227"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"
__designer:dtid="6473924464345228"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"
__designer:dtid="6473924464345229"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"
__designer:dtid="6473924464345230"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID"
__designer:dtid="6473924464345231"></asp:Parameter>
</UpdateParameters>
<DeleteParameters __designer:dtid="6473924464345200">
<asp:Parameter Type="Decimal" Name="ID"
__designer:dtid="6473924464345201"></asp:Parameter>
</DeleteParameters>
</asp:SqlDataSource>
</dx:PanelContent>
</panelcollection>
<noheadertopedge backcolor="White">
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif"></Backgroun
dImage>
</noheadertopedge>
</dx:ASPxRoundPanel> </div>
</form>
</asp:Content>
Mall.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
DevExpress.Web.ASPxPivotGrid;
324
using
using
using
using
using
using
using
using
System.Collections.Generic;
DevExpress.XtraCharts;
CJM.Database.Oracle;
System.Data.OracleClient;
CJM.Reference;
CJM.Project.LGE;
DevExpress.Web.ASPxEditors;
DevExpress.Web.ASPxGridView;
public partial class Administrator_Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_USER_ID"] == null)
{
Response.Redirect("../Default.aspx");
}
}
/*================================================================
==================================================================
======//
INI PROSES PADA MENU MALL
==================================================================
==================================================================
====**/
// ------------------------------ EVENT TOMBOL SAVE
protected void BtnSave_Mall_Click(object sender, EventArgs e)
{
string oMallProv = MallProv.SelectedItem.Value;
string oMallCode = MallCode.Text;
string oMallName = MallName.Text;
string oMallAddr = MallAddr.Text;
string oMallPhone = MallPhone.Text;
string oMallStatus = MallStatus.SelectedItem.Value;
string oMallCompany = MallCompany.SelectedItem.Value;
string oMallCity = MallCity.SelectedItem.Value;
//---------------------------------------------------------------------//INSERT KE TABLE GNRL_REF_MALL
//----------------------------------------------------------------------string myQueryMall = "INSERT INTO GNRL_REF_MALL" +
"
(MALL_CODE,PROV_ID,MALL_NAME,ADDRESS,CITY_ID,TELP_NO,INACTIVE,COMP
_ID)" +
" VALUES(" +
"'" + oMallCode + "'," +
"'" + oMallProv + "'," +
"'" + oMallName + "'," +
"'" + oMallAddr + "'," +
325
"'" +
"'" +
"'" +
"'" +
")";
oMallCity + "'," +
oMallPhone + "'," +
oMallStatus + "'," +
oMallCompany + "'" +
bool suksesInsertMall =
ConnOracle.ExecNonQueryConnOra(myQueryMall);
if (suksesInsertMall)
{
MallProv.SelectedItem.Text = "";
MallCode.Text = "";
MallName.Text = "";
MallAddr.Text = "";
MallPhone.Text = "";
MallStatus.SelectedItem.Selected = false;
MallCompany.SelectedItem.Text = "";
MallCity.SelectedItem.Text = "";
Alert.Show("Insert Mall Success.");
}
else
{
//lblMsg.Text = "Insert Failed .";
Alert.Show("Insert Mall Failed.");
}
}
protected void BtnCancel_Mall_Click(object sender, EventArgs
e)
{
Response.Redirect("province.aspx");
}
}
UserManagement.aspx
<%@ Page Language="C#"
MasterPageFile="../AppModules/MasterPage.master"
AutoEventWireup="true" CodeFile="UserManagement.aspx.cs"
Inherits="Administrator_Default2" Title="Untitled Page"
EnableEventValidation="false" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxUploadControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
326
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxMenu" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxClasses" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
<div>
<!-- ======================== TABLE UTAMA
=========================== -->
<%-<dx:GridViewDataHyperLinkColumn VisibleIndex="0">
<DataItemTemplate>
<a
href="usermanagement.aspx?id_edit=<%#Eval ("ID")%>">Edit</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataHyperLinkColumn VisibleIndex="0">
<DataItemTemplate>
<a
href="usermanagement.aspx?id_delete=<%#Eval ("ID")%>">Delete</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
--%>
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
BackColor="White" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
CssPostfix="Aqua" HeaderText="User Management"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
327
Width="200px">
<topedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif"></BackgroundImage>
</topedge>
<leftedge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif"></BackgroundImage>
</leftedge>
<headercontent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headercontent>
<contentpaddings padding="14px"></contentpaddings>
<rightedge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif"></BackgroundImage
>
</rightedge>
<headerrightedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headerrightedge>
<border bordercolor="#AECAF0" borderstyle="Solid"
borderwidth="1px"></border>
<headerstyle backcolor="#E0EDFF">
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></BorderBottom>
</headerstyle>
<headerleftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headerleftedge>
<bottomedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Bottom"
ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif"></BackgroundImag
e>
</bottomedge>
<panelcollection>
<dx:PanelContent runat="server"><asp:Label runat="server"
Width="450px" ID="CaptionUtama">User Management</asp:Label>
<BR /><dx:ASPxPageControl runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" ActiveTabIndex="2" Width="900px"
ID="ASPxPageControl1"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
TabSpacing="3px"><TabPages>
<dx:TabPage Text="User"><ContentCollection>
<dx:ContentControl runat="server"><TABLE
width="100%"><TBODY><TR><TD style="WIDTH: 159px; HEIGHT:
16px">user name</TD><TD style="WIDTH: 9px; HEIGHT: 16px">:</TD><TD
style="WIDTH: 1161px; HEIGHT: 16px"> <asp:TextBox
runat="server" ID="UserName"></asp:TextBox>
</TD></TR><TR><TD style="WIDTH: 159px">Password</TD><TD
style="WIDTH: 9px">:</TD><TD style="WIDTH:
328
1161px"> <asp:TextBox runat="server"
ID="Password"></asp:TextBox>
</TD></TR><TR><TD style="WIDTH: 159px; HEIGHT: 26px">Full
Name</TD><TD style="WIDTH: 9px; HEIGHT: 26px">:</TD><TD
style="WIDTH: 1161px; HEIGHT: 26px"> <asp:TextBox
runat="server" ID="FullName"></asp:TextBox>
</TD></TR><TR><TD style="WIDTH: 159px">Company</TD><TD
style="WIDTH: 9px">:</TD><TD style="WIDTH:
1161px"> <asp:DropDownList runat="server"
DataSourceID="DbCompany" DataValueField="ID" ID="Company"
DataTextField="COMP_NAME"></asp:DropDownList>
</TD></TR><TR><TD style="WIDTH: 159px">Applied</TD><TD
style="WIDTH: 9px">:</TD><TD style="WIDTH:
1161px"><asp:RadioButtonList runat="server"
ID="Applied"><asp:ListItem Value="Y">Yes</asp:ListItem>
<asp:ListItem Value="N">No</asp:ListItem>
</asp:RadioButtonList>
</TD></TR><TR><TD style="WIDTH: 159px; TEXT-ALIGN:
right"></TD><TD style="WIDTH: 9px"></TD><TD style="WIDTH:
1161px"><asp:Button runat="server" ID="BtnSave" Width="58px"
Text="save" OnClick="BtnSave_Click"></asp:Button>
 <asp:Button runat="server" ID="BtnCancel" Text="Cancel"
OnClick="BtnCancel_Click"></asp:Button>
</TD></TR><TR><TD style="TEXT-ALIGN: right" colSpan=3>
<HR color=royalblue />
</TD></TR><TR><TD style="WIDTH: 159px; TEXT-ALIGN: right"></TD><TD
style="WIDTH: 9px"></TD><TD style="WIDTH:
1161px"></TD></TR><TR><TD style="TEXT-ALIGN: left"
colSpan=3><dx:ASPxGridView runat="server" CssPostfix="Aqua"
Width="100%" ID="ASPxGridView_User" DataSourceID="DbUser"
AutoGenerateColumns="False"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<Images SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
<LoadingPanelOnStatusBar
Url="~/App_Themes/Aqua/GridView/gvLoadingOnStatusBar.gif"></Loadin
gPanelOnStatusBar>
<LoadingPanel
Url="~/App_Themes/Aqua/GridView/Loading.gif"></LoadingPanel>
</Images>
<ImagesFilterControl>
<LoadingPanel
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanel>
</ImagesFilterControl>
<Styles CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<LoadingPanel ImageSpacing="8px"></LoadingPanel>
</Styles>
<ImagesEditors>
<SpinEditLargeIncrement>
329
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeIncImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeIncImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeIncrement>
<SpinEditLargeDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeDecImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeDecImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeDecrement>
<SpinEditIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditIncrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditIncrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditIncrement>
<SpinEditDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditDecrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditDecrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditDecrement>
<DropDownEditDropDown>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</DropDownEditDropDown>
</ImagesEditors>
<Settings ShowFilterRow="True"></Settings>
<StylesEditors>
<CalendarHeader Spacing="1px"></CalendarHeader>
<ProgressBar Height="25px"></ProgressBar>
</StylesEditors>
<SettingsPager PageSize="5"
NumericButtonCount="5"></SettingsPager>
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0">
<ClearFilterButton Visible="True"></ClearFilterButton>
<DeleteButton Visible="True"></DeleteButton>
<EditButton Visible="True"></EditButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn VisibleIndex="1"
FieldName="USER_NAME"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2"
FieldName="USER_PASSW"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3"
FieldName="FULL_NAME"></dx:GridViewDataTextColumn>
330
<dx:GridViewDataTextColumn VisibleIndex="4"
FieldName="COMP_ID"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="5"
FieldName="APPLIED"></dx:GridViewDataTextColumn>
</Columns>
<SettingsLoadingPanel ImagePosition="Top"></SettingsLoadingPanel>
</dx:ASPxGridView>
  </TD></TR></TBODY></TABLE></dx:ContentControl>
</ContentCollection>
</dx:TabPage>
<dx:TabPage Text="Role"><ContentCollection>
<dx:ContentControl runat="server">
<table width="100%">
<tr>
<td style="width: 159px; height:
16px;">
Code</td>
<td style="width: 9px; height:
16px;">
:</td>
<td style="width: 1161px; height:
16px;">
<asp:TextBox runat="server"
ID="RoleCode"></asp:TextBox>
</td>
</tr>
<tr>
<td style="width: 159px;">
Name</td>
<td style="width: 9px;">
:</td>
<td style="width: 1161px;">
<asp:TextBox runat="server"
ID="RoleName"></asp:TextBox>
</td>
</tr>
<tr>
<td style="width: 159px;">
Description</td>
<td style="width: 9px;">
:</td>
<td style="width: 1161px;">
<asp:TextBox runat="server"
ID="RoleDesc"></asp:TextBox>
</td>
</tr>
<tr>
<td style="width: 159px; height:
16px; text-align: left">
Company</td>
331
<td style="width: 9px; height:
16px">
:</td>
<td style="width: 1161px; height:
16px">
<asp:DropDownList
runat="server" DataSourceID="DbCompany" DataValueField="ID"
ID="RoleCompany" DataTextField="COMP_NAME"></asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 159px; textalign: left; height: 16px;">
Status</td>
<td style="width: 9px; height:
16px;">
</td>
<td style="width: 1161px; height:
16px;">
<asp:RadioButtonList
runat="server" ID="RoleStatus"><asp:ListItem
Value="Y">Active</asp:ListItem>
<asp:ListItem Selected="True" Value="N">Inactive</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td style="width: 159px; textalign: right;">
</td>
<td style="width: 9px;">
</td>
<td style="width: 1161px;">
<asp:Button runat="server"
ID="Btn_RoleSave" Width="56px" Text="Save"
OnClick="Btn_RoleSave_Click"></asp:Button>
 
<asp:Button runat="server"
ID="Btn_RoleCancel" Text="Cancel"
OnClick="Btn_RoleCancel_Click"></asp:Button>
</td>
</tr>
<tr>
<td style="text-align: right;"
colspan="3"><hr color="royalblue" />
   </td>
</tr>
<tr>
<td colspan="3" style="height:
16px">
</td>
332
</tr>
<tr>
<td colspan="3">
<dx:ASPxGridView
runat="server" CssPostfix="Aqua" Width="100%" ID="ASPxGridView1"
DataSourceID="DbRole" KeyFieldName="ID"
AutoGenerateColumns="False"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<Images SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
<LoadingPanelOnStatusBar
Url="~/App_Themes/Aqua/GridView/gvLoadingOnStatusBar.gif"></Loadin
gPanelOnStatusBar>
<LoadingPanel
Url="~/App_Themes/Aqua/GridView/Loading.gif"></LoadingPanel>
</Images>
<ImagesFilterControl>
<LoadingPanel
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanel>
</ImagesFilterControl>
<Styles CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<LoadingPanel ImageSpacing="8px"></LoadingPanel>
</Styles>
<ImagesEditors>
<SpinEditLargeIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeIncImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeIncImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeIncrement>
<SpinEditLargeDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeDecImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeDecImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeDecrement>
<SpinEditIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditIncrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditIncrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditIncrement>
<SpinEditDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditDecrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditDecrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditDecrement>
<DropDownEditDropDown>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
333
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</DropDownEditDropDown>
</ImagesEditors>
<Settings ShowFilterRow="True"></Settings>
<StylesEditors>
<CalendarHeader Spacing="1px"></CalendarHeader>
<ProgressBar Height="25px"></ProgressBar>
</StylesEditors>
<SettingsPager PageSize="5"
NumericButtonCount="5"></SettingsPager>
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0">
<ClearFilterButton Visible="True"></ClearFilterButton>
<DeleteButton Visible="True"></DeleteButton>
<EditButton Visible="True"></EditButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn VisibleIndex="1"
FieldName="ROLE_CODE"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2"
FieldName="ROLE_NAME"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3"
FieldName="ROLE_DESC"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4"
FieldName="INACTIVE"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="5"
FieldName="COMP_ID"></dx:GridViewDataTextColumn>
</Columns>
<SettingsLoadingPanel ImagePosition="Top"></SettingsLoadingPanel>
</dx:ASPxGridView>
</td>
</tr>
</table>
</dx:ContentControl>
</ContentCollection>
</dx:TabPage>
<dx:TabPage Text="Menu"><ContentCollection>
<dx:ContentControl runat="server">
<table width="100%">
<tr>
<td style="width: 100px">
Name</td>
<td style="width: 9px">
:</td>
<td style="width: 843px">
<asp:TextBox
runat="server" ID="MenuName"></asp:TextBox>
</td>
334
</tr>
<tr>
<td style="width: 100px;
height: 24px;">
Company</td>
<td style="width: 9px; height:
24px;">
:</td>
<td style="width: 843px;
height: 24px;">
<asp:DropDownList
runat="server" DataSourceID="DbCompany" DataValueField="ID"
ID="MenuCompany" DataTextField="COMP_NAME"></asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 100px">
Type</td>
<td style="width: 9px">
:</td>
<td style="width: 843px">
<asp:RadioButtonList
runat="server" AutoPostBack="True" ID="MenuType"><asp:ListItem
Value="0">Menu</asp:ListItem>
<asp:ListItem Value="1">Sub Menu</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td style="width: 100px">
Parent</td>
<td style="width: 9px">
:</td>
<td style="width: 843px">
<asp:DropDownList
runat="server" DataSourceID="DbMenu" Enabled="False"
DataValueField="ID" ID="MenuParent"
DataTextField="MENU_NAME"><asp:ListItem Selected="True"
Value="0">--Pilih--</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 100px">
File Web</td>
<td style="width: 9px">
:</td>
<td style="width: 843px">
<asp:FileUpload
runat="server" Enabled="False" ID="MenuFile"></asp:FileUpload>
335
 <span style="fontsize: 8pt; color: #ff0033"> (*.aspx) file</span></td>
</tr>
<tr>
<td style="width: 100px;">
File Class</td>
<td style="width: 9px;">
:</td>
<td style="width: 843px;">
<asp:FileUpload
runat="server" Enabled="False" ID="MenuClass"></asp:FileUpload>
 <span style="fontsize: 8pt; color: #ff0033"> (*.aspx.cs) file</span></td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 9px">
</td>
<td style="width: 843px">
<asp:Button runat="server"
ID="Btn_MenuSave" Width="57px" Text="Save"
OnClick="Btn_MenuSave_Click"></asp:Button>
 <asp:Button
runat="server" ID="Btn_menuCancel" Text="Cancel"
OnClick="Btn_menuCancel_Click"></asp:Button>
</td>
</tr>
<tr>
<td colspan="3"><hr
color="royalblue"
/>
 </td>
</tr>
<tr>
<td style="width: 100px; text-
align: right; height: 16px;">
</td>
<td style="width: 9px; height:
16px;">
</td>
<td style="width: 843px;
height: 16px;">
</td>
</tr>
<tr>
<td style="text-align: left;"
colspan="3">
  <dx:ASPxGridView runat="server" CssPostfix="Aqua"
Width="100%" ID="ASPxGridView2" DataSourceID="DbMenu"
KeyFieldName="ID" AutoGenerateColumns="False"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
OnDetailsChanged="Page_Load">
336
<Images SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
<LoadingPanelOnStatusBar
Url="~/App_Themes/Aqua/GridView/gvLoadingOnStatusBar.gif"></Loadin
gPanelOnStatusBar>
<LoadingPanel
Url="~/App_Themes/Aqua/GridView/Loading.gif"></LoadingPanel>
</Images>
<ImagesFilterControl>
<LoadingPanel
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanel>
</ImagesFilterControl>
<Styles CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<LoadingPanel ImageSpacing="8px"></LoadingPanel>
</Styles>
<ImagesEditors>
<SpinEditLargeIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeIncImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeIncImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeIncrement>
<SpinEditLargeDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeDecImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeDecImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeDecrement>
<SpinEditIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditIncrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditIncrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditIncrement>
<SpinEditDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditDecrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditDecrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditDecrement>
<DropDownEditDropDown>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</DropDownEditDropDown>
</ImagesEditors>
<Settings ShowFilterRow="True"></Settings>
<StylesEditors>
337
<CalendarHeader Spacing="1px"></CalendarHeader>
<ProgressBar Height="25px"></ProgressBar>
</StylesEditors>
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0">
<ClearFilterButton Visible="True"></ClearFilterButton>
<DeleteButton Visible="True"></DeleteButton>
<EditButton Visible="True"></EditButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn VisibleIndex="1"
FieldName="MENU_NAME"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2"
FieldName="COMP_ID"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3"
FieldName="PARENT_MENU"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4"
FieldName="APP_MENU"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="5"
FieldName="MENU_TYPE"></dx:GridViewDataTextColumn>
</Columns>
<SettingsLoadingPanel ImagePosition="Top"></SettingsLoadingPanel>
</dx:ASPxGridView>
</td>
</tr>
</table>
</dx:ContentControl>
</ContentCollection>
</dx:TabPage>
<dx:TabPage Text="Map Role & Menu"><ContentCollection>
<dx:ContentControl runat="server">
<table width="100%">
<tr>
<td style="width: 100px; height:
16px">
Company</td>
<td style="width: 9px; height:
16px">
:</td>
<td style="width: 834px; height:
16px">
<asp:DropDownList
runat="server" DataSourceID="DbCompany" AutoPostBack="True"
DataValueField="ID" ID="Mp_company"
DataTextField="COMP_NAME"></asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 100px; height:
16px;">
Role</td>
338
<td style="width: 9px; height:
16px;">
:</td>
<td style="width: 834px; height:
16px;">
<asp:DropDownList
runat="server" DataSourceID="DbRole" Enabled="False"
DataValueField="ID" ID="Mp_Role"
DataTextField="ROLE_NAME"></asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 100px">
Menu</td>
<td style="width: 9px">
:</td>
<td style="width: 834px">
<asp:DropDownList
runat="server" DataSourceID="DbMenu" Enabled="False"
DataValueField="ID" ID="Mp_Menu"
DataTextField="MENU_NAME"></asp:DropDownList>
</td>
</tr>
<tr>
<td style="width:
Readable</td>
<td style="width:
:</td>
<td style="width:
<asp:CheckBox
Text="Y" ID="Mp_Readable"></asp:CheckBox>
100px">
9px">
834px">
runat="server"
</td>
</tr>
<tr>
<td style="width: 100px">
Writeable</td>
<td style="width: 9px">
:</td>
<td style="width: 834px">
<asp:CheckBox runat="server"
Text="Y" ID="Mp_Writeable"></asp:CheckBox>
</td>
</tr>
<tr>
<td style="width: 100px">
Updateable</td>
<td style="width: 9px">
:</td>
<td style="width: 834px">
<asp:CheckBox runat="server"
Text="Y" ID="Mp_Updateable"></asp:CheckBox>
339
</td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 9px">
</td>
<td style="width: 834px">
<asp:Button runat="server"
ID="Mp_Save" Width="60px" Text="Save"
OnClick="Mp_Save_Click"></asp:Button>
 
<asp:Button runat="server"
ID="Mp_Cancel" Text="Cancel"
OnClick="Mp_Cancel_Click"></asp:Button>
</td>
</tr>
<tr>
<td colspan="3">
<hr color="royalblue" />
 </td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 9px">
</td>
<td style="width: 834px">
</td>
</tr>
<tr>
<td style="text-align: left;"
colspan="3">
 <dx:ASPxGridView
runat="server" CssPostfix="Aqua" Width="100%" ID="ASPxGridView3"
DataSourceID="Db_RoleMenu" KeyFieldName="ID"
AutoGenerateColumns="False"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<Images SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
<LoadingPanelOnStatusBar
Url="~/App_Themes/Aqua/GridView/gvLoadingOnStatusBar.gif"></Loadin
gPanelOnStatusBar>
<LoadingPanel
Url="~/App_Themes/Aqua/GridView/Loading.gif"></LoadingPanel>
</Images>
<ImagesFilterControl>
<LoadingPanel
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanel>
</ImagesFilterControl>
340
<Styles CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<LoadingPanel ImageSpacing="8px"></LoadingPanel>
</Styles>
<ImagesEditors>
<SpinEditLargeIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeIncImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeIncImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeIncrement>
<SpinEditLargeDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeDecImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeDecImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeDecrement>
<SpinEditIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditIncrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditIncrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditIncrement>
<SpinEditDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditDecrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditDecrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditDecrement>
<DropDownEditDropDown>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</DropDownEditDropDown>
</ImagesEditors>
<Settings ShowFilterRow="True"></Settings>
<StylesEditors>
<CalendarHeader Spacing="1px"></CalendarHeader>
<ProgressBar Height="25px"></ProgressBar>
</StylesEditors>
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0">
<DeleteButton Visible="True"></DeleteButton>
<EditButton Visible="True"></EditButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn ReadOnly="True" VisibleIndex="1"
FieldName="ID"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2"
FieldName="ID_ROLE"></dx:GridViewDataTextColumn>
341
<dx:GridViewDataTextColumn VisibleIndex="3"
FieldName="ID_MENU"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4"
FieldName="COMP_ID"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="5"
FieldName="READABLE"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="6"
FieldName="WRITABLE"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="7"
FieldName="UPDATABLE"></dx:GridViewDataTextColumn>
</Columns>
<SettingsLoadingPanel ImagePosition="Top"></SettingsLoadingPanel>
</dx:ASPxGridView>
</td>
</tr>
</table>
</dx:ContentControl>
</ContentCollection>
</dx:TabPage>
<dx:TabPage Text="Map user & menu"><ContentCollection>
<dx:ContentControl runat="server">
<table width="100%">
<tr>
<td style="width: 100px; height:
16px;">
User</td>
<td style="width: 9px; height:
16px;">
:</td>
<td style="width: 842px; height:
16px;">
<asp:DropDownList
runat="server" DataSourceID="DbUser" DataValueField="ID"
ID="Ru_User" DataTextField="USER_NAME"></asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 100px">
Role
Menu</td>
<td style="width: 9px">
:</td>
<td style="width: 842px">
<asp:DropDownList
runat="server" DataSourceID="Db_RoleMenu" DataValueField="ID"
ID="Ru_Menu" DataTextField="ID"></asp:DropDownList>
</td>
</tr>
<tr>
<td style="width: 100px">
</td>
342
<td style="width: 9px">
</td>
<td style="width: 842px">
<asp:Button runat="server"
ID="Ru_Save" Width="57px" Text="Save"
OnClick="Ru_Save_Click"></asp:Button>
 
<asp:Button runat="server"
ID="Ru_Cancel" Text="Cancel"
OnClick="Ru_Cancel_Click"></asp:Button>
</td>
</tr>
<tr>
<td colspan="3">
<hr color="royalblue" />
 </td>
</tr>
<tr>
<td style="width: 100px">
</td>
<td style="width: 9px">
</td>
<td style="width: 842px">
</td>
</tr>
<tr>
<td style="text-align: left;"
colspan="3">
  <dx:ASPxGridView
runat="server" CssPostfix="Aqua" Width="100%" ID="ASPxGridView4"
DataSourceID="Db_RoleUser" KeyFieldName="ID"
AutoGenerateColumns="False"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<Images SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
<LoadingPanelOnStatusBar
Url="~/App_Themes/Aqua/GridView/gvLoadingOnStatusBar.gif"></Loadin
gPanelOnStatusBar>
<LoadingPanel
Url="~/App_Themes/Aqua/GridView/Loading.gif"></LoadingPanel>
</Images>
<ImagesFilterControl>
<LoadingPanel
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanel>
</ImagesFilterControl>
<Styles CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<LoadingPanel ImageSpacing="8px"></LoadingPanel>
</Styles>
<ImagesEditors>
<SpinEditLargeIncrement>
343
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeIncImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeIncImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeIncrement>
<SpinEditLargeDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeDecImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeDecImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeDecrement>
<SpinEditIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditIncrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditIncrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditIncrement>
<SpinEditDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditDecrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditDecrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditDecrement>
<DropDownEditDropDown>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</DropDownEditDropDown>
</ImagesEditors>
<Settings ShowFilterRow="True"></Settings>
<StylesEditors>
<CalendarHeader Spacing="1px"></CalendarHeader>
<ProgressBar Height="25px"></ProgressBar>
</StylesEditors>
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0">
<ClearFilterButton Visible="True"></ClearFilterButton>
<DeleteButton Visible="True"></DeleteButton>
<EditButton Visible="True"></EditButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn ReadOnly="True" VisibleIndex="1"
FieldName="ID"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2"
FieldName="ID_USER"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3"
FieldName="ID_ROLEMENU"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4"
FieldName="INPUT_BY"></dx:GridViewDataTextColumn>
344
<dx:GridViewDataDateColumn VisibleIndex="5"
FieldName="INPUT_DATE"></dx:GridViewDataDateColumn>
</Columns>
<SettingsLoadingPanel ImagePosition="Top"></SettingsLoadingPanel>
</dx:ASPxGridView>
</td>
</tr>
</table>
</dx:ContentControl>
</ContentCollection>
</dx:TabPage>
</TabPages>
</dx:ASPxPageControl>
<asp:SqlDataSource runat="server" ID="DbCompany"
SelectCommand="SELECT "ID", "COMP_CODE",
"COMP_NAME", "PROV_ID", "ID_CITY"
FROM "GNRL_REF_COMPANY" ORDER BY "COMP_NAME""
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="DbUser"
SelectCommand="SELECT * FROM "UTL_REF_USER""
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="DbMenu"
SelectCommand="SELECT * FROM "UTL_REF_MENU""
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="DbRole"
SelectCommand="SELECT "ID", "ROLE_CODE",
"ROLE_NAME", "ROLE_DESC", "COMP_ID",
"INACTIVE" FROM "UTL_REF_ROLE" ORDER BY
"ROLE_NAME""
OldValuesParameterFormatString="original_{0}"
ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM
"UTL_REF_ROLE" WHERE "ID" = :original_ID AND
(("ROLE_CODE" = :original_ROLE_CODE) OR
("ROLE_CODE" IS NULL AND :original_ROLE_CODE IS NULL))
AND (("ROLE_NAME" = :original_ROLE_NAME) OR
("ROLE_NAME" IS NULL AND :original_ROLE_NAME IS NULL))
AND (("ROLE_DESC" = :original_ROLE_DESC) OR
("ROLE_DESC" IS NULL AND :original_ROLE_DESC IS NULL))
AND (("COMP_ID" = :original_COMP_ID) OR
("COMP_ID" IS NULL AND :original_COMP_ID IS NULL)) AND
(("INACTIVE" = :original_INACTIVE) OR
("INACTIVE" IS NULL AND :original_INACTIVE IS NULL))"
InsertCommand="INSERT INTO "UTL_REF_ROLE"
("ID", "ROLE_CODE", "ROLE_NAME",
"ROLE_DESC", "COMP_ID", "INACTIVE")
VALUES (:ID, :ROLE_CODE, :ROLE_NAME, :ROLE_DESC, :COMP_ID,
:INACTIVE)" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
UpdateCommand="UPDATE "UTL_REF_ROLE" SET
345
"ROLE_CODE" = :ROLE_CODE, "ROLE_NAME" =
:ROLE_NAME, "ROLE_DESC" = :ROLE_DESC,
"COMP_ID" = :COMP_ID, "INACTIVE" = :INACTIVE
WHERE "ID" = :original_ID AND (("ROLE_CODE" =
:original_ROLE_CODE) OR ("ROLE_CODE" IS NULL AND
:original_ROLE_CODE IS NULL)) AND (("ROLE_NAME" =
:original_ROLE_NAME) OR ("ROLE_NAME" IS NULL AND
:original_ROLE_NAME IS NULL)) AND (("ROLE_DESC" =
:original_ROLE_DESC) OR ("ROLE_DESC" IS NULL AND
:original_ROLE_DESC IS NULL)) AND (("COMP_ID" =
:original_COMP_ID) OR ("COMP_ID" IS NULL AND
:original_COMP_ID IS NULL)) AND (("INACTIVE" =
:original_INACTIVE) OR ("INACTIVE" IS NULL AND
:original_INACTIVE IS NULL))"><InsertParameters>
<asp:Parameter Type="Decimal" Name="ID"></asp:Parameter>
<asp:Parameter Type="String" Name="ROLE_CODE"></asp:Parameter>
<asp:Parameter Type="String" Name="ROLE_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="ROLE_DESC"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="INACTIVE"></asp:Parameter>
</InsertParameters>
<UpdateParameters>
<asp:Parameter Type="String" Name="ROLE_CODE"></asp:Parameter>
<asp:Parameter Type="String" Name="ROLE_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="ROLE_DESC"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="INACTIVE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ROLE_CODE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ROLE_NAME"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ROLE_DESC"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_COMP_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_INACTIVE"></asp:Parameter>
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ROLE_CODE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ROLE_NAME"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ROLE_DESC"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_COMP_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_INACTIVE"></asp:Parameter>
</DeleteParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Db_RoleMenu"
SelectCommand="SELECT * FROM "UTL_ROLE_MENU" ORDER BY
"ID"" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
346
<asp:SqlDataSource runat="server" ID="Db_RoleUser"
SelectCommand="SELECT * FROM "UTL_ROLE_USER""
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
</dx:PanelContent>
</panelcollection>
<noheadertopedge backcolor="White">
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif"></Backgroun
dImage>
</noheadertopedge>
</dx:ASPxRoundPanel> </div>
</form>
</asp:Content>
UserManagement.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
CJM.Database.Oracle;
System.Data.OracleClient;
CJM.Reference;
System.IO;
DevExpress.Web.ASPxEditors;
DevExpress.Web.ASPxGridView;
public partial class Administrator_Default2 : System.Web.UI.Page
{
//fungsi untuk melakukan pengecekan tipe file gambar
bool CekTipeFile1(string fileName)
{
string ekstensi = Path.GetExtension(fileName).ToLower();
if (ekstensi == ".aspx")
{
return true;
}
else
{
return false;
}
}
bool CekTipeFile2(string fileName)
{
string ekstensi = Path.GetExtension(fileName).ToLower();
if (ekstensi == ".cs")
347
{
return true;
}
else
{
return false;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_USER_ID"] == null)
{
Response.Redirect("../Default.aspx");
}
if (MenuType.SelectedValue == "1")
{
MenuFile.Enabled = true;
MenuClass.Enabled = true;
MenuParent.Enabled = true;
}
else
{
MenuFile.Enabled = false;
MenuClass.Enabled = false;
MenuParent.Enabled = false;
}
//=============== filter role dan menu
pada tab menu&role
if (Mp_company.SelectedValue != "")
{
Mp_Role.Enabled = true;
Mp_Menu.Enabled = true;
}
else
{
Mp_Role.Enabled = false;
Mp_Menu.Enabled = false;
}
}
/*================================================================
==================================================================
======//
INI PROSES PADA TAB USER
==================================================================
==================================================================
====**/
// ------------------------------ EVENT TOMBOL SAVE
protected void BtnSave_Click(object sender, EventArgs e)
{
string oUserName = UserName.Text;
string oPassword = Password.Text;
348
string oFullName = FullName.Text;
string oCompany =
RoleCompany.SelectedItem.Value.ToString();
string oApplied = Applied.SelectedItem.Value.ToString();
//---------------------------------------------------------------------//INSERT KE TABLE UTL_REF_USER
//----------------------------------------------------------------------string myQueryUser = "INSERT INTO UTL_REF_USER" +
" (USER_NAME, USER_PASSW, FULL_NAME,
COMP_ID, APPLIED)" +
" VALUES(" +
"'" + oUserName + "'," +
"'" + oPassword + "'," +
"'" + oFullName + "'," +
"'" + oCompany + "'," +
"'" + oApplied + "'" +
")";
bool suksesInsertUser =
ConnOracle.ExecNonQueryConnOra(myQueryUser);
if (suksesInsertUser)
{
UserName.Text = "";
Password.Text = "";
FullName.Text = "";
//Company.Text = "";
RoleCompany.SelectedItem.Text = "";
Applied.SelectedItem.Selected = false;
Alert.Show("Insert user Success.");
//Response.Redirect("RegistrasiOwner.aspx");
}
else
{
Alert.Show("Insert user Failed.");
}
}
// ------------------------------ EVENT TOMBOL CANCEL
protected void BtnCancel_Click(object sender, EventArgs e)
{
Response.Redirect("Usermanagement.aspx");
}
/*================================================================
==================================================================
======//
INI PROSES PADA TAB MENU
==================================================================
==================================================================
====**/
349
//------------------------------ EVENT TOMBOL SAVE
protected void Btn_MenuSave_Click(object sender, EventArgs e)
{
string oMenuName = MenuName.Text;
string oMenuCompany = MenuCompany.SelectedValue;
string oMenuType = MenuType.SelectedValue;
string oMenuParent = MenuParent.SelectedValue;
string oMenuFile = MenuFile.FileName;
string oMenuClass = MenuClass.FileName;
string strUpload = "~/AppModules/"+ MenuFile.FileName;
//----------- cek file upload
if (MenuFile.HasFile && MenuClass.HasFile)
{
//cek ekstensi file
if (CekTipeFile1(MenuFile.FileName))
{
string strUploadFile =
Path.Combine("~/AppModules/", MenuFile.FileName);
strUploadFile = MapPath(strUploadFile);
MenuFile.SaveAs(strUploadFile);
//Response.Write("File sudah berhasil diupload
!");
}
if (CekTipeFile2(MenuClass.FileName))
{
string strUploadFile2 =
Path.Combine("~/AppModules/", MenuClass.FileName);
strUploadFile2 = MapPath(strUploadFile2);
MenuClass.SaveAs(strUploadFile2);
//Response.Write("File sudah berhasil diupload
!");
}
}
/*---------------------------------------------------------------------INSERT KE TABLE UTL_REF_MENU
-----------------------------------------------------------------------**/
string myQueryMenu = "INSERT INTO UTL_REF_MENU" +
" (menu_name, comp_id, parent_Menu,
app_menu, menu_type)" +
" VALUES(" +
"'" + oMenuName + "'," +
"'" + oMenuCompany + "'," +
"'" + oMenuParent + "'," +
"'" + strUpload + "'," +
"'" + oMenuType + "'" +
")";
bool suksesInsertMenu =
ConnOracle.ExecNonQueryConnOra(myQueryMenu);
if (suksesInsertMenu)
{
MenuName.Text = "";
350
MenuCompany.SelectedItem.Text = "";
//MenuParent.SelectedItem.Text = "";
MenuType.SelectedItem.Text = "";
//MenuFile.FileName = "";
//MenuClass.FileName = "";
Alert.Show("Insert Menu Success.");
//Response.Redirect("RegistrasiOwner.aspx");
}
else
{
Alert.Show("Insert user Failed.");
}
}
// ------------------------------ EVENT TOMBOL CANCEL
protected void Btn_menuCancel_Click(object sender, EventArgs
e)
{
Response.Redirect("Usermanagement.aspx");
}
/*================================================================
==================================================================
======//
INI PROSES PADA TAB ROLE
==================================================================
==================================================================
====**/
//------------------------------ EVENT TOMBOL SAVE
protected void Btn_RoleSave_Click(object sender, EventArgs e)
{
string oRoleCode = RoleCode.Text;
string oRoleName = RoleName.Text;
string oRoleDesc = RoleDesc.Text;
string oRoleStatus = RoleStatus.SelectedValue;
string oRoleCompany = RoleCompany.SelectedValue;
/*---------------------------------------------------------------------INSERT KE TABLE UTL_REF_ROLE
-----------------------------------------------------------------------**/
string myQueryRole = "INSERT INTO UTL_REF_ROLE" +
" (role_code, role_name, role_desc,
inactive, comp_id)" +
" VALUES(" +
"'" + oRoleCode + "'," +
"'" + oRoleName + "'," +
"'" + oRoleDesc + "'," +
"'" + oRoleStatus + "'," +
"'" + oRoleCompany + "'" +
351
")";
bool suksesInsertRole =
ConnOracle.ExecNonQueryConnOra(myQueryRole);
if (suksesInsertRole)
{
RoleCode.Text ="";
RoleName.Text = "";
RoleDesc.Text = "";
Alert.Show("Insert Role Success.");
//Response.Redirect("RegistrasiOwner.aspx");
}
else
{
Alert.Show("Insert Role Failed.");
}
}
protected void Btn_RoleCancel_Click(object sender, EventArgs
e)
{
Response.Redirect("Usermanagement.aspx");
}
/*================================================================
==================================================================
======//
INI PROSES PADA TAB MAP
ROLE & MENU
==================================================================
==================================================================
====**/
protected void Mp_Save_Click(object sender, EventArgs e)
{
string oMp_Role = Mp_Role.SelectedValue;
string oMp_Menu = Mp_Menu.SelectedValue;
string oMp_Readable = Mp_Readable.Text;
string oMp_Writeable = Mp_Writeable.Text;
string oMp_Updateable = Mp_Updateable.Text;
string oMp_Company = Mp_company.SelectedValue;
/*---------------------------------------------------------------------INSERT KE TABLE UTL_ROLE_MENU
-----------------------------------------------------------------------**/
string myQueryRole = "INSERT INTO UTL_ROLE_MENU" +
" (id_role, id_menu, readable,
writable, updatable, comp_id)" +
" VALUES(" +
"'" + oMp_Role + "'," +
352
"'" + oMp_Menu + "'," +
"'" + oMp_Readable + "'," +
"'" + oMp_Writeable + "'," +
"'" + oMp_Updateable + "'," +
"'" + oMp_Company + "'" +
")";
bool suksesInsertRole =
ConnOracle.ExecNonQueryConnOra(myQueryRole);
if (suksesInsertRole)
{
Mp_Role.SelectedItem.Text = "";
Mp_Menu.SelectedItem.Text = "";
Mp_Readable.Checked = false;
Mp_Writeable.Checked = false;
Mp_Updateable.Checked = false;
Alert.Show("Insert Map Role & Menu Success.");
//Response.Redirect("RegistrasiOwner.aspx");
}
else
{
Alert.Show("Insert Map Role & Menu Failed.");
}
}
protected void Mp_Cancel_Click(object sender, EventArgs e)
{
Response.Redirect("Usermanagement.aspx");
}
/*================================================================
==================================================================
======//
INI PROSES PADA TAB MAP
ROLE MENU & USER
==================================================================
==================================================================
====**/
protected void Ru_Save_Click(object sender, EventArgs e)
{
string oRu_User = Ru_User.SelectedValue;
string oRu_Menu = Ru_Menu.SelectedValue;
/*---------------------------------------------------------------------INSERT KE TABLE UTL_ROLE_USER
-----------------------------------------------------------------------**/
string myQueryRoleUser = "INSERT INTO UTL_ROLE_USER" +
" (id_user, id_rolemenu)" +
" VALUES(" +
"'" + oRu_User + "'," +
"'" + oRu_Menu + "'" +
")";
353
bool suksesInsertRoleUser =
ConnOracle.ExecNonQueryConnOra(myQueryRoleUser);
if (suksesInsertRoleUser)
{
Ru_User.SelectedItem.Text = "";
Ru_Menu.SelectedItem.Text = "";
Alert.Show("Insert Map Role Menu & User Success.");
//Response.Redirect("RegistrasiOwner.aspx");
}
else
{
Alert.Show("Insert Map Role Menu & User Failed.");
}
}
protected void Ru_Cancel_Click(object sender, EventArgs e)
{
Response.Redirect("Usermanagement.aspx");
}
}
WorkArea.aspx
<%@ Page Language="C#"
MasterPageFile="../AppModules/MasterPage.master"
EnableEventValidation="false" AutoEventWireup="true"
CodeFile="WorkArea.aspx.cs" Inherits="Administrator_Default2"
Title="Untitled Page" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxClasses" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
354
<form id="form1">
<div>
<!-- ======================== TABLE UTAMA
=========================== -->
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
BackColor="White" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
CssPostfix="Aqua" HeaderText="Work Area"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
Width="200px">
<topedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif"></BackgroundImage>
</topedge>
<leftedge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif"></BackgroundImage>
</leftedge>
<headercontent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headercontent>
<contentpaddings padding="14px"></contentpaddings>
<rightedge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif"></BackgroundImage
>
</rightedge>
<headerrightedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headerrightedge>
<border bordercolor="#AECAF0" borderstyle="Solid"
borderwidth="1px"></border>
<headerstyle backcolor="#E0EDFF">
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></BorderBottom>
</headerstyle>
<headerleftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headerleftedge>
<bottomedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Bottom"
ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif"></BackgroundImag
e>
</bottomedge>
<panelcollection>
<dx:PanelContent runat="server"><asp:Label runat="server"
Width="450px" ID="CaptionUtama"
__designer:dtid="8444249301319688">Work Area</asp:Label>
<BR /><asp:ScriptManager runat="server" ID="ScriptManager1"
__designer:dtid="8444249301319691"></asp:ScriptManager>
<TABLE width=900 __designer:dtid="8444249301319692"><TBODY><TR
__designer:dtid="8444249301319693"><TD style="WIDTH: 100px"
__designer:dtid="8444249301319694">Position</TD><TD style="WIDTH:
355
6px" __designer:dtid="8444249301319695">:</TD><TD style="WIDTH:
827px" __designer:dtid="8444249301319696"><asp:UpdatePanel
runat="server" ID="UpdatePanel1"
__designer:dtid="8444249301319697"><ContentTemplate
__designer:dtid="8444249301319698">
<asp:DropDownList id="DropDownList1" runat="server"
DataSourceID="DB_pos"
OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
__designer:wfdid="w591" AutoPostBack="True"
DataTextField="PARAMETER_VALUE"
DataValueField="ID"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress1"
AssociatedUpdatePanelID="UpdatePanel1"
__designer:dtid="8444249301319699"><ProgressTemplate
__designer:dtid="8444249301319700">
<DIV class="progress"><asp:Image id="imgProgress" runat="server"
ImageUrl="~/images/wait.gif" Width="150px"
__designer:wfdid="w592"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR __designer:dtid="8444249301319701"><TD
style="WIDTH: 100px; HEIGHT: 16px"
__designer:dtid="8444249301319702">Name</TD><TD style="WIDTH: 6px;
HEIGHT: 16px" __designer:dtid="8444249301319703">:</TD><TD
style="WIDTH: 827px; HEIGHT: 16px"
__designer:dtid="8444249301319704"><asp:UpdatePanel runat="server"
ID="UpdatePanel2"
__designer:dtid="8444249301319705"><ContentTemplate
__designer:dtid="8444249301319706">
<dx:ASPxComboBox id="Nama" runat="server" __designer:wfdid="w593"
EnableIncrementalFiltering="True"
ValueType="System.String"></dx:ASPxComboBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR __designer:dtid="8444249301319707"><TD
style="WIDTH: 100px; HEIGHT: 24px"
__designer:dtid="8444249301319708">Province</TD><TD style="WIDTH:
6px; HEIGHT: 24px" __designer:dtid="8444249301319709">:</TD><TD
style="WIDTH: 827px; HEIGHT: 24px"
__designer:dtid="8444249301319710"><asp:UpdatePanel runat="server"
ID="UpdatePanel3"
__designer:dtid="8444249301319711"><ContentTemplate
__designer:dtid="8444249301319712">
<asp:DropDownList id="MallProv" runat="server"
OnSelectedIndexChanged="MallProv_SelectedIndexChanged"
__designer:wfdid="w594" AutoPostBack="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress2"
AssociatedUpdatePanelID="UpdatePanel3"
__designer:dtid="8444249301319713"><ProgressTemplate
__designer:dtid="8444249301319714">
<DIV class="progress"><asp:Image id="imgProgress2" runat="server"
ImageUrl="~/images/wait.gif" Width="150px"
__designer:wfdid="w595"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
356
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR __designer:dtid="8444249301319715"><TD
style="WIDTH: 100px; HEIGHT: 22px"
__designer:dtid="8444249301319716">City</TD><TD style="WIDTH: 6px;
HEIGHT: 22px" __designer:dtid="8444249301319717">:</TD><TD
style="WIDTH: 827px; HEIGHT: 22px"
__designer:dtid="8444249301319718"><asp:UpdatePanel runat="server"
ID="UpdatePanel4"
__designer:dtid="8444249301319719"><ContentTemplate
__designer:dtid="8444249301319720">
<asp:DropDownList id="MallCity" runat="server"
__designer:wfdid="w596"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR __designer:dtid="8444249301319721"><TD
style="WIDTH: 100px" __designer:dtid="8444249301319722"></TD><TD
style="WIDTH: 6px" __designer:dtid="8444249301319723"></TD><TD
style="WIDTH: 827px"
__designer:dtid="8444249301319724"><asp:Button runat="server"
ID="BtnSave_Mall" Width="56px" Text="Save"
__designer:dtid="8444249301319725"
OnClick="BtnSave_Mall_Click"></asp:Button>
 <asp:Button runat="server" ID="BtnCancel_Mall"
Text="Cancel" __designer:dtid="8444249301319726"
OnClick="BtnCancel_Mall_Click"></asp:Button>
</TD></TR><TR __designer:dtid="8444249301319727"><TD colSpan=3
__designer:dtid="8444249301319728">
<HR color=cornflowerblue __designer:dtid="8444249301319729" />
</TD></TR><TR __designer:dtid="8444249301319730"><TD
style="HEIGHT: 233px" vAlign=top colSpan=3
__designer:dtid="8444249301319731"><asp:Label runat="server" FontBold="True" Width="580px" ForeColor="Red" ID="Label1"
__designer:dtid="8444249301319732"></asp:Label>
<dx:ASPxGridView runat="server" Width="696px" ID="ASPxGridView1"
AutoGenerateColumns="False" __designer:dtid="8444249301319733"
OnProcessColumnAutoFilter="ASPxGridView1_ProcessColumnAutoFilter"
OnRowUpdating="ASPxGridView1_RowUpdating"
OnRowDeleting="ASPxGridView1_RowDeleting">
<Settings ShowGroupPanel="True"
__designer:dtid="8444249301319738"></Settings>
<Columns __designer:dtid="8444249301319734">
<dx:GridViewDataTextColumn VisibleIndex="0" FieldName="EMP_NAME"
Caption="Sales Name"
__designer:dtid="8444249301319735"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="1" FieldName="CITY_NAME"
Caption="City"
__designer:dtid="8444249301319736"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2" FieldName="PROV_NAME"
Caption="Province"
__designer:dtid="8444249301319737"></dx:GridViewDataTextColumn>
</Columns>
</dx:ASPxGridView>
  </TD></TR></TBODY></TABLE><BR /><asp:SqlDataSource
runat="server" ID="Db_City" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
__designer:dtid="8444249301319739"></asp:SqlDataSource>
357
<asp:SqlDataSource runat="server" ID="Db_Province"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" __designer:dtid="8444249301319740"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="DB_pos"
SelectCommand="SELECT "ID", "PARAMETER_CODE",
"PARAMETER_VALUE", "PAR_ID" FROM
"GNRL_PARAMETER_VALUE" WHERE ("PAR_ID" =
:PAR_ID) ORDER BY "ID"" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
__designer:dtid="8444249301319741"><SelectParameters
__designer:dtid="8444249301319742">
<asp:Parameter Type="Decimal" DefaultValue="4" Name="PAR_ID"
__designer:dtid="8444249301319743"></asp:Parameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="DB_Grid"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" __designer:dtid="8444249301319744"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="DB_SO" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
__designer:dtid="8444249301319745"></asp:SqlDataSource>
</dx:PanelContent>
</panelcollection>
<noheadertopedge backcolor="White">
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif"></Backgroun
dImage>
</noheadertopedge>
</dx:ASPxRoundPanel> </div>
</form>
</asp:Content>
WorkArea.aspx.cs
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
CJM.Database.Oracle;
System.Data.OracleClient;
CJM.Reference;
CJM.Project.LGE;
DevExpress.Web.ASPxCallbackPanel;
DevExpress.Web.ASPxGridView;
DevExpress.Web.ASPxEditors;
DevExpress.Web.ASPxClasses;
358
public partial class Administrator_Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_USER_ID"] == null)
{
Response.Redirect("../Default.aspx");
}
if (!IsPostBack)
{
DataBinds();
}
if(IsCallback)
{
DataBinds();
}
}
private void DataBinds()
{
string query = "SELECT A.ID, A.CITY_ID,
A.PROV_ID, A.SALES_ID, B.CITY_NAME, C.PROV_NAME, D.EMP_NAME "+
"FROM EMP_SALES_WORKAREA A,
GNRL_REF_CITY B, GNRL_REF_PROVINCE C, EMP_SALES_OFFICER D "+
"WHERE A.SALES_ID = D.ID AND
A.CITY_ID = B.ID AND A.PROV_ID = C.ID";
OracleDataAdapter ad = new OracleDataAdapter(query,
ConnOracle.ConnOra());
DataSet ds = new DataSet();
ad.Fill(ds);
ASPxGridView1.DataSource = ds;
ASPxGridView1.DataBind();
}
protected void BtnSave_Mall_Click(object sender, EventArgs e)
{
string oMallProv = MallProv.SelectedItem.Value;
string oMallName = Nama.SelectedItem.Value.ToString();
string oMallCity = MallCity.SelectedItem.Value;
//---------------------------------------------------------------------//INSERT KE TABLE GNRL_REF_MALL
//----------------------------------------------------------------------string myQueryMall = "INSERT INTO EMP_SALES_WORKAREA" +
" (SALES_ID,PROV_ID,CITY_ID,
INPUT_BY)" +
" VALUES(" +
"" + oMallName + "," +
"" + oMallProv + "," +
"" + oMallCity + "," +
"'" + Session["SESS_USER_ID"] + "'" +
")";
359
bool suksesInsertMall =
ConnOracle.ExecNonQueryConnOra(myQueryMall);
if (suksesInsertMall)
{
MallProv.SelectedItem.Text = "";
Nama.Text = "";
MallCity.SelectedItem.Text = "";
Alert.Show("Insert Mall Success.");
}
else
{
Alert.Show("Insert Mall Failed.");
}
}
protected void BtnCancel_Mall_Click(object sender, EventArgs
e)
{
Response.Redirect("WorkArea.aspx");
}
protected void DropDownList1_SelectedIndexChanged(object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string pos = DropDownList1.SelectedValue;
DB_SO.SelectCommand = "SELECT ID, EMP_NAME FROM " +
"EMP_SALES_OFFICER " +
"WHERE ID_POSITION = "
+ pos + "";
Nama.DataSource = DB_SO;
Nama.TextField = "EMP_NAME";
Nama.ValueField = "ID";
Nama.DataBind();
Nama.Items.Insert(0, new ListEditItem("-- chose --", "
"));
Db_Province.SelectCommand = "SELECT ID, PROV_NAME FROM
GNRL_REF_PROVINCE ";
MallProv.DataSource = Db_Province;
MallProv.DataTextField = "PROV_NAME";
MallProv.DataValueField = "ID";
MallProv.DataBind();
MallProv.Items.Insert(0, new ListItem("-- chose --", "
"));
}
protected void MallProv_SelectedIndexChanged(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
360
string prov = MallProv.SelectedValue;
Db_City.SelectCommand = "SELECT ID, CITY_NAME FROM " +
"GNRL_REF_CITY " +
"WHERE PROV_ID = " +
prov + "";
MallCity.DataSource = Db_City;
MallCity.DataTextField = "CITY_NAME";
MallCity.DataValueField = "ID";
MallCity.DataBind();
MallCity.Items.Insert(0, new ListItem("-- chose --", "
"));
}
protected void ASPxGridView1_RowDeleting(object sender,
DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
{
}
protected void ASPxGridView1_RowUpdating(object sender,
DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
{
string OCITY_ID = e.NewValues["CITY_ID"].ToString();
string OPROV_ID = e.NewValues["PROV_ID"].ToString();
string OEMP_ID = e.NewValues["EMP_ID"].ToString();
string OID = e.Keys["ID"].ToString();
string myQueryUpdate = "UPDATE EMP_SALES_WORKAREA SET " +
"CITY_ID= " + OCITY_ID + ", " +
"PROV_ID= " + OPROV_ID + ", " +
"SALES_ID= " + OEMP_ID + " " +
" WHERE ID
= '" + OID + "'";
bool suksesUpdate =
ConnOracle.ExecNonQueryConnOra(myQueryUpdate);
if (suksesUpdate)
{
Label1.Text = "Insert Parameter success.";
e.Cancel = true;
ASPxGridView1.CancelEdit();
}
else
{
Label1.Text = "Insert Parameter Failed.";
}
}
protected void ASPxGridView1_ProcessColumnAutoFilter(object
sender,
DevExpress.Web.ASPxGridView.ASPxGridViewAutoFilterEventArgs e)
{
361
if (!object.ReferenceEquals(e.Column,
ASPxGridView1.Columns["PROV_NAME"])) return;
string oldValue = Session["PROV_ID"] != null ?
(string)Session["PROV_ID"] : string.Empty;
Session["PROV_ID"] = e.Value;
if (!object.Equals(oldValue, e.Value))
{
ASPxGridView1.AutoFilterByColumn(ASPxGridView1.Columns["CITY_NAME"
], "");
}
}
}
RegistrasiOwner.aspx
<%--<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="RegistrasiOwner.aspx.cs" Inherits="AppModules_Default2"
%>
--%>
<%@ Page Language="C#" MasterPageFile="MasterPage.master"
AutoEventWireup="true" CodeFile="RegistrasiOwner.aspx.cs"
Inherits="AppModules_Default2" Title="Sales Management System"
EnableEventValidation="false" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=B88D1754D700E49A"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
<div style="text-align: left">
<!-- ======================== TABLE UTAMA
=========================== -->
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
CssFilePath="~/App_Themes/Glass/{0}/styles.css"
CssPostfix="Glass" HeaderText="Owner Registration"
Width="200px" BackColor="#EBF2F4"
SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css">
<border bordercolor="#7EACB1" borderstyle="Solid"
borderwidth="1px"></border>
<bottomedge BackColor="#D7E9F1">
</bottomedge>
362
<panelcollection>
<dx:PanelContent runat="server"><TABLE width="900"><TBODY><TR><TD
style="TEXT-ALIGN: center;" colSpan=6><asp:Label runat="server"
Text="Label" Width="368px" ID="CaptionUtama" Font-Bold="True"
Font-Size="Large" ForeColor="SteelBlue"
Visible="False"></asp:Label>
<asp:ScriptManager runat="server"
ID="ScriptManager1"></asp:ScriptManager>
  </TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption1"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><SPAN style="FONT-SIZE: 10pt; COLOR:
#ff0033"><asp:UpdatePanel runat="server"
ID="UpdatePanel1"><ContentTemplate>
<asp:TextBox id="EMP_NAME" tabIndex=1 runat="server"
CausesValidation="True"></asp:TextBox> <BR
/><asp:RequiredFieldValidator id="RequiredFieldValidator1"
runat="server" Width="222px" ErrorMessage="Name can't be null"
ControlToValidate="EMP_NAME" Display="Dynamic"
SetFocusOnError="True"></asp:RequiredFieldValidator> <asp:TextBox
id="TextBox1" tabIndex=2 runat="server"
Visible="False"></asp:TextBox> 
</ContentTemplate>
</asp:UpdatePanel>
</SPAN></TD><TD style="WIDTH: 110px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption10"></asp:Label>
</TD><TD vAlign=top>:</TD><TD style="WIDTH: 671px"
vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel7"><ContentTemplate>
<asp:TextBox id="ID_NO" tabIndex=11 runat="server"
Enabled="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption2"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><SPAN style="FONT-SIZE: 10pt; COLOR:
#ff0033"><asp:UpdatePanel runat="server"
ID="UpdatePanel2"><ContentTemplate>
<asp:TextBox id="MOBILE_NO" tabIndex=3 runat="server"
OnTextChanged="MOBILE_NO_TextChanged" AutoPostBack="True"
BorderColor="#E0E0E0" BackColor="LightSteelBlue"></asp:TextBox>
<BR /><asp:RequiredFieldValidator id="RequiredFieldValidator2"
runat="server" Width="224px" SetFocusOnError="True"
Display="Dynamic" ControlToValidate="MOBILE_NO"
ErrorMessage="Mobile No can't be
null"></asp:RequiredFieldValidator> <asp:Label id="Label1"
runat="server" Width="221px" ForeColor="Green" Font-Size="Medium"
Font-Bold="True"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress1"
AssociatedUpdatePanelID="UpdatePanel2"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress" runat="server"
ImageUrl="~/images/wait.gif"
363
Width="150px"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</SPAN></TD><TD style="WIDTH: 110px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption11"></asp:Label>
</TD><TD vAlign=top>:</TD><TD style="WIDTH: 671px"
vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel8"><ContentTemplate>
<asp:DropDownList id="ID_TYPE" tabIndex=12 runat="server"
DataSourceID="Table_Gnrl_parameter" Enabled="False"
DataValueField="ID" DataTextField="PARAMETER_CODE"
AppendDataBoundItems="True"></asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption3"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel3"><ContentTemplate>
<asp:RadioButtonList id="SEX" tabIndex=4 runat="server"
Enabled="False">
<asp:ListItem Selected="True"
Value="L">Male</asp:ListItem>
<asp:ListItem
Value="P">Female</asp:ListItem>
</asp:RadioButtonList>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 110px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption12"></asp:Label>
</TD><TD vAlign=top>:</TD><TD style="WIDTH: 671px"
vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel9"><ContentTemplate>
<dx:ASPxDateEdit id="ID_EXPIRED" tabIndex=13 runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
Enabled="False" ShowShadow="False" EditFormat="Custom"
EditFormatString="dd/MM/yy">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<CalendarProperties>
<HeaderStyle Spacing="1px"></HeaderStyle>
364
<FooterStyle Spacing="17px"></FooterStyle>
</CalendarProperties>
</dx:ASPxDateEdit>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption4"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel4"><ContentTemplate>
<asp:TextBox id="NICK_NAME" tabIndex=5 runat="server"
Enabled="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 110px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption13"></asp:Label>
</TD><TD vAlign=top>:</TD><TD style="WIDTH: 671px"
vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel10"><ContentTemplate>
<asp:TextBox id="ADDRESS" tabIndex=14 runat="server"
Enabled="False" TextMode="MultiLine"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption5"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel5"><ContentTemplate>
<dx:ASPxDateEdit id="DATE_BIRTH" tabIndex=6 runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
Enabled="False" ShowShadow="False" EditFormat="Custom"
EditFormatString="dd/MM/yy">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<CalendarProperties>
<HeaderStyle Spacing="1px"></HeaderStyle>
<FooterStyle Spacing="17px"></FooterStyle>
</CalendarProperties>
</dx:ASPxDateEdit><asp:RequiredFieldValidator
id="RequiredFieldValidator6" runat="server" Width="228px"
SetFocusOnError="True" Display="Dynamic"
365
ControlToValidate="DATE_BIRTH" ErrorMessage="Date Birth can't be
null"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 110px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption14"></asp:Label>
</TD><TD vAlign=top>:</TD><TD style="WIDTH: 671px"
vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel11"><ContentTemplate>
<asp:DropDownList id="PROV_ID" tabIndex=15 runat="server"
DataSourceID="Table_Prov" Enabled="False" AutoPostBack="True"
DataValueField="ID" DataTextField="PROV_NAME"
AppendDataBoundItems="True"
OnSelectedIndexChanged="PROV_ID_SelectedIndexChanged"><asp:ListIte
m Selected="True" Value="0">-- Chose --</asp:ListItem>
</asp:DropDownList><BR /><asp:RequiredFieldValidator
id="RequiredFieldValidator3" runat="server" Width="237px"
SetFocusOnError="True" Display="Dynamic"
ControlToValidate="PROV_ID" ErrorMessage="Province can't be
null"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress2"
AssociatedUpdatePanelID="UpdatePanel11"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress2" runat="server"
ImageUrl="~/images/wait.gif"
Width="150px"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption6"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel6"><ContentTemplate>
<asp:TextBox id="PLACE_BIRTH" tabIndex=7 runat="server"
Enabled="False"></asp:TextBox><BR /><asp:RequiredFieldValidator
id="RequiredFieldValidator5" runat="server" Width="227px"
SetFocusOnError="True" Display="Dynamic"
ControlToValidate="PLACE_BIRTH" ErrorMessage="Place Birth can't be
null"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 110px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption15"></asp:Label>
</TD><TD vAlign=top>:</TD><TD style="WIDTH: 671px"
vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel12"><ContentTemplate>
<asp:DropDownList id="CITY_ID" tabIndex=16 runat="server"
DataSourceID="Table_City" Enabled="False" DataValueField="ID"
DataTextField="CITY_NAME"></asp:DropDownList> <BR
/><asp:RequiredFieldValidator id="RequiredFieldValidator4"
runat="server" Width="239px" SetFocusOnError="True"
Display="Dynamic" ControlToValidate="CITY_ID" ErrorMessage="City
can't be null"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
366
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption7"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel16"><ContentTemplate>
<asp:DropDownList id="MANAGEPARTNER" tabIndex=8 runat="server"
Enabled="False" AppendDataBoundItems="True"><asp:ListItem
Selected="True" Value="N">-- chose --</asp:ListItem>
<asp:ListItem Value="Y">yes</asp:ListItem>
<asp:ListItem Value="N">No</asp:ListItem>
</asp:DropDownList> <asp:RequiredFieldValidator
id="RequiredFieldValidator8" runat="server" Width="207px"
ControlToValidate="MANAGEPARTNER" ErrorMessage="Manage Partner
can't be null"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 110px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption16"></asp:Label>
</TD><TD vAlign=top>:</TD><TD style="WIDTH: 671px"
vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel13"><ContentTemplate>
<dx:ASPxDateEdit id="REGISTER_DATE" tabIndex=17 runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
Enabled="False" ShowShadow="False" EditFormat="Custom"
EditFormatString="dd/MM/yy">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<CalendarProperties>
<HeaderStyle Spacing="1px"></HeaderStyle>
<FooterStyle Spacing="17px"></FooterStyle>
</CalendarProperties>
</dx:ASPxDateEdit><BR /><asp:RequiredFieldValidator
id="RequiredFieldValidator7" runat="server" Width="241px"
SetFocusOnError="True" ControlToValidate="REGISTER_DATE"
ErrorMessage="Register Date can't be
null"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption8"></asp:Label>
367
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel17"><ContentTemplate>
<asp:TextBox id="USERNAME" tabIndex=9 runat="server"
Enabled="False"></asp:TextBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator9" runat="server" Width="228px"
ControlToValidate="USERNAME" ErrorMessage="User name can't be
null"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 110px" vAlign=top></TD><TD
vAlign=top></TD><TD style="WIDTH: 671px"
vAlign=top></TD></TR><TR><TD style="WIDTH: 166px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption9"></asp:Label>
</TD><TD style="WIDTH: 11px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel18"><ContentTemplate>
<asp:TextBox id="PASSWORD" tabIndex=10 runat="server"
Enabled="False" BackColor="Gainsboro"
ReadOnly="True">123456</asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 110px" vAlign=top></TD><TD
vAlign=top></TD><TD style="WIDTH: 671px" vAlign=top></TD></TR>
<tr>
<td style="width: 166px; height: 26px;" valign="top">
</td>
<td style="width: 11px; height: 26px;" valign="top">
</td>
<td style="width: 289px; height: 26px;" valign="top">
</td>
<td valign="top" align="right">
<dx:ASPxButton ID="ASPxButton4" runat="server"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
CssPostfix="Office2003Silver"
OnClick="ASPxButton4_Click"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
Text="Save" Width="80px">
</dx:ASPxButton>
</td>
<td style="height: 26px;" valign="top">
</td>
<td valign="top" align="left">
<dx:ASPxButton ID="ASPxButton3" runat="server"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
CssPostfix="Office2003Silver"
OnClick="ASPxButton3_Click"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
Text="Cancel" Width="80px"
CausesValidation="False">
</dx:ASPxButton>
</td>
</tr>
<TR><TD colSpan=7 style="width: 940px">
<HR style="WIDTH: 101%" color=#006fae />
 </TD></TR><TR><TD style="HEIGHT: 1px; width: 940px;"
colSpan=7><!-- ============================================= DATA
GRID =============================================================
368
--><!-- ============================================= AKHIR DATA
GRID =============================================================
--><asp:UpdatePanel runat="server"
ID="UpdatePanel14"><ContentTemplate>
<dx:ASPxGridView id="ASPxGridView1" tabIndex=21 runat="server"
Width="900px" DataSourceID="SqlDataSource1" Visible="False"
OnRowUpdating="ASPxGridView1_RowUpdating" KeyFieldName="ID"
AutoGenerateColumns="False"
OnRowDeleting="ASPxGridView1_RowDeleting">
<SettingsPager Visible="False" Position="Top"></SettingsPager>
<Columns>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="0"><DataItemTemplate>
<a href="EditRegistrasiOwner.aspx?id_edit=<%#Eval
("ID")%>">Edit</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="1"><DataItemTemplate>
<a href="EditRegistrasiOwner.aspx?id_delete=<%#Eval
("ID")%>">Delete</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewCommandColumn Visible="False" VisibleIndex="2">
<DeleteButton Visible="True"></DeleteButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn ReadOnly="True" VisibleIndex="2"
FieldName="ID"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3" FieldName="EMP_NAME"
Caption="Owner Name"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4" FieldName="EMP_CODE"
Caption="Code"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="5"
FieldName="ID_USER"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="6" FieldName="CITY"
Caption="City"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="7" FieldName="PROVINCE"
Caption="Province"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="8" FieldName="NICK_NAME"
Caption="Nick Name"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="9" FieldName="SEX"
Caption="Sex"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="10" FieldName="ID_NO"
Caption="ID No"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="11" FieldName="ID_TYPE"
Caption="Type"></dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn VisibleIndex="12"
FieldName="ID_EXPIRED" Caption="ID
Expired"></dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn VisibleIndex="13" FieldName="MOBILE_NO"
Caption="Mobile No"></dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn VisibleIndex="14"
FieldName="DATE_BIRTH" Caption="Birth
Date"></dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn VisibleIndex="15"
FieldName="PLACE_BIRTH" Caption="Place
Birth"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="16" FieldName="ADDRESS"
Caption="Address"></dx:GridViewDataTextColumn>
369
<dx:GridViewDataTextColumn VisibleIndex="17"
FieldName="COMP"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="18"
FieldName="ID_PARENT"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="19"
FieldName="OWNER"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="20" FieldName="POSITION"
Caption="Position"></dx:GridViewDataTextColumn>
</Columns>
<Settings ShowGroupPanel="True" ShowVerticalScrollBar="True"
ShowFilterRow="True" ShowHorizontalScrollBar="True"></Settings>
</dx:ASPxGridView>       
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel15" runat="server">
<ContentTemplate>
<dx:ASPxButton ID="ASPxButton1" runat="server"
CausesValidation="False"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
CssPostfix="Office2003Olive"
OnClick="ASPxButton1_Click"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
Text="Open Grid" Width="100px">
</dx:ASPxButton>
<dx:ASPxButton ID="ASPxButton2" runat="server"
CausesValidation="False"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
CssPostfix="Office2003Olive"
OnClick="ASPxButton2_Click"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
Text="Close Grid" Visible="False" Width="100px">
</dx:ASPxButton>
</ContentTemplate>
</asp:UpdatePanel>
                 
 
<asp:SqlDataSource runat="server" ID="Table_Prov"
SelectCommand="SELECT * FROM "GNRL_REF_PROVINCE" ORDER
BY "PROV_NAME"" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_Position"
SelectCommand="SELECT ID, PARAMETER_CODE, PARAMETER_VALUE, PAR_ID,
START_VALUE, END_VALUE, INPUT_BY, INPUT_DATE, UPDATE_BY,
UPDATE_DATE FROM GNRL_PARAMETER_VALUE WHERE (PAR_ID IN ('3',
'4'))" ConnectionString="<%$ ConnectionStrings:ConnectionString
%>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_Gnrl_parameter"
SelectCommand="SELECT "ID", "PARAMETER_CODE",
"PARAMETER_VALUE", "PAR_ID" FROM
"GNRL_PARAMETER_VALUE" WHERE ("PAR_ID" =
:PAR_ID)" ConnectionString="<%$ ConnectionStrings:ConnectionString
%>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"><SelectParameters>
370
<asp:Parameter Type="Decimal" DefaultValue="10"
Name="PAR_ID"></asp:Parameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_City"
SelectCommand="SELECT "ID", "PROV_ID",
"CITY_CODE", "CITY_NAME",
"INACTIVE", "REGION_ID",
"POSTAL_CODE" FROM "GNRL_REF_CITY" WHERE
(("PROV_ID" = :PROV_ID) AND ("INACTIVE" =
:INACTIVE)) ORDER BY "CITY_NAME"" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"><SelectParameters>
<asp:ControlParameter PropertyName="SelectedValue" Type="Decimal"
DefaultValue="1" Name="PROV_ID"
ControlID="PROV_ID"></asp:ControlParameter>
<asp:Parameter Type="String" DefaultValue="N"
Name="INACTIVE"></asp:Parameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="SqlDataSource1"
SelectCommand="SELECT id,emp_name, emp_code, id_user
,utility_pkg.load_description(city_id, 'CITY') city
,utility_pkg.load_description(prov_id, 'PROVINCE')
province
,nick_name, DECODE(sex,'L','MALE', 'P', 'FEMALE') sex,
id_no, id_type, id_expired, mobile_no, date_birth, place_birth,
address
,DECODE(comp_id, NULL,
'??',utility_pkg.load_description(comp_id, 'COMPANY')) comp
,id_parent
,DECODE(id_parent, NULL, '',utility_pkg.load_description(id_parent, 'OWNER')) owner
,utility_pkg.get_parvalue(id_position) position
FROM emp_store
ORDER BY id desc" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_EmpStore"
SelectCommand="SELECT * FROM EMP_STORE ORDER BY EMP_NAME"
OldValuesParameterFormatString="original_{0}"
ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM
"EMP_STORE" WHERE "ID" = :original_ID AND
(("EMP_NAME" = :original_EMP_NAME) OR
("EMP_NAME" IS NULL AND :original_EMP_NAME IS NULL)) AND
(("EMP_CODE" = :original_EMP_CODE) OR
("EMP_CODE" IS NULL AND :original_EMP_CODE IS NULL)) AND
(("ID_USER" = :original_ID_USER) OR ("ID_USER"
IS NULL AND :original_ID_USER IS NULL)) AND (("CITY_ID"
= :original_CITY_ID) OR ("CITY_ID" IS NULL AND
:original_CITY_ID IS NULL)) AND (("PROV_ID" =
:original_PROV_ID) OR ("PROV_ID" IS NULL AND
:original_PROV_ID IS NULL)) AND (("NICK_NAME" =
:original_NICK_NAME) OR ("NICK_NAME" IS NULL AND
:original_NICK_NAME IS NULL)) AND (("SEX" =
:original_SEX) OR ("SEX" IS NULL AND :original_SEX IS
NULL)) AND (("ID_NO" = :original_ID_NO) OR
371
("ID_NO" IS NULL AND :original_ID_NO IS NULL)) AND
(("ID_TYPE" = :original_ID_TYPE) OR ("ID_TYPE"
IS NULL AND :original_ID_TYPE IS NULL)) AND
(("ID_EXPIRED" = :original_ID_EXPIRED) OR
("ID_EXPIRED" IS NULL AND :original_ID_EXPIRED IS NULL))
AND (("MOBILE_NO" = :original_MOBILE_NO) OR
("MOBILE_NO" IS NULL AND :original_MOBILE_NO IS NULL))
AND (("DATE_BIRTH" = :original_DATE_BIRTH) OR
("DATE_BIRTH" IS NULL AND :original_DATE_BIRTH IS NULL))
AND (("PLACE_BIRTH" = :original_PLACE_BIRTH) OR
("PLACE_BIRTH" IS NULL AND :original_PLACE_BIRTH IS
NULL)) AND (("ADDRESS" = :original_ADDRESS) OR
("ADDRESS" IS NULL AND :original_ADDRESS IS NULL)) AND
(("INPUT_DATE" = :original_INPUT_DATE) OR
("INPUT_DATE" IS NULL AND :original_INPUT_DATE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
(("UPDATE_DATE" = :original_UPDATE_DATE) OR
("UPDATE_DATE" IS NULL AND :original_UPDATE_DATE IS
NULL)) AND (("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))
AND (("COMP_ID" = :original_COMP_ID) OR
("COMP_ID" IS NULL AND :original_COMP_ID IS NULL)) AND
(("ID_PARENT" = :original_ID_PARENT) OR
("ID_PARENT" IS NULL AND :original_ID_PARENT IS NULL))
AND (("ID_POSITION" = :original_ID_POSITION) OR
("ID_POSITION" IS NULL AND :original_ID_POSITION IS
NULL))" InsertCommand="INSERT INTO "EMP_STORE"
("ID", "EMP_NAME", "EMP_CODE",
"ID_USER", "CITY_ID", "PROV_ID",
"NICK_NAME", "SEX", "ID_NO",
"ID_TYPE", "ID_EXPIRED",
"MOBILE_NO", "DATE_BIRTH",
"PLACE_BIRTH", "ADDRESS",
"INPUT_DATE", "INPUT_BY",
"UPDATE_DATE", "UPDATE_BY",
"COMP_ID", "ID_PARENT",
"ID_POSITION") VALUES (:ID, :EMP_NAME, :EMP_CODE,
:ID_USER, :CITY_ID, :PROV_ID, :NICK_NAME, :SEX, :ID_NO, :ID_TYPE,
:ID_EXPIRED, :MOBILE_NO, :DATE_BIRTH, :PLACE_BIRTH, :ADDRESS,
:INPUT_DATE, :INPUT_BY, :UPDATE_DATE, :UPDATE_BY, :COMP_ID,
:ID_PARENT, :ID_POSITION)" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName %>"
UpdateCommand="UPDATE "EMP_STORE" SET
"EMP_NAME" = :EMP_NAME, "EMP_CODE" =
:EMP_CODE, "ID_USER" = :ID_USER, "CITY_ID" =
:CITY_ID, "PROV_ID" = :PROV_ID, "NICK_NAME" =
:NICK_NAME, "SEX" = :SEX, "ID_NO" = :ID_NO,
"ID_TYPE" = :ID_TYPE, "ID_EXPIRED" =
:ID_EXPIRED, "MOBILE_NO" = :MOBILE_NO,
"DATE_BIRTH" = :DATE_BIRTH, "PLACE_BIRTH" =
:PLACE_BIRTH, "ADDRESS" = :ADDRESS,
"INPUT_DATE" = :INPUT_DATE, "INPUT_BY" =
:INPUT_BY, "UPDATE_DATE" = :UPDATE_DATE,
"UPDATE_BY" = :UPDATE_BY, "COMP_ID" =
:COMP_ID, "ID_PARENT" = :ID_PARENT,
"ID_POSITION" = :ID_POSITION WHERE "ID" =
:original_ID AND (("EMP_NAME" = :original_EMP_NAME) OR
372
("EMP_NAME" IS NULL AND :original_EMP_NAME IS NULL)) AND
(("EMP_CODE" = :original_EMP_CODE) OR
("EMP_CODE" IS NULL AND :original_EMP_CODE IS NULL)) AND
(("ID_USER" = :original_ID_USER) OR ("ID_USER"
IS NULL AND :original_ID_USER IS NULL)) AND (("CITY_ID"
= :original_CITY_ID) OR ("CITY_ID" IS NULL AND
:original_CITY_ID IS NULL)) AND (("PROV_ID" =
:original_PROV_ID) OR ("PROV_ID" IS NULL AND
:original_PROV_ID IS NULL)) AND (("NICK_NAME" =
:original_NICK_NAME) OR ("NICK_NAME" IS NULL AND
:original_NICK_NAME IS NULL)) AND (("SEX" =
:original_SEX) OR ("SEX" IS NULL AND :original_SEX IS
NULL)) AND (("ID_NO" = :original_ID_NO) OR
("ID_NO" IS NULL AND :original_ID_NO IS NULL)) AND
(("ID_TYPE" = :original_ID_TYPE) OR ("ID_TYPE"
IS NULL AND :original_ID_TYPE IS NULL)) AND
(("ID_EXPIRED" = :original_ID_EXPIRED) OR
("ID_EXPIRED" IS NULL AND :original_ID_EXPIRED IS NULL))
AND (("MOBILE_NO" = :original_MOBILE_NO) OR
("MOBILE_NO" IS NULL AND :original_MOBILE_NO IS NULL))
AND (("DATE_BIRTH" = :original_DATE_BIRTH) OR
("DATE_BIRTH" IS NULL AND :original_DATE_BIRTH IS NULL))
AND (("PLACE_BIRTH" = :original_PLACE_BIRTH) OR
("PLACE_BIRTH" IS NULL AND :original_PLACE_BIRTH IS
NULL)) AND (("ADDRESS" = :original_ADDRESS) OR
("ADDRESS" IS NULL AND :original_ADDRESS IS NULL)) AND
(("INPUT_DATE" = :original_INPUT_DATE) OR
("INPUT_DATE" IS NULL AND :original_INPUT_DATE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
(("UPDATE_DATE" = :original_UPDATE_DATE) OR
("UPDATE_DATE" IS NULL AND :original_UPDATE_DATE IS
NULL)) AND (("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))
AND (("COMP_ID" = :original_COMP_ID) OR
("COMP_ID" IS NULL AND :original_COMP_ID IS NULL)) AND
(("ID_PARENT" = :original_ID_PARENT) OR
("ID_PARENT" IS NULL AND :original_ID_PARENT IS NULL))
AND (("ID_POSITION" = :original_ID_POSITION) OR
("ID_POSITION" IS NULL AND :original_ID_POSITION IS
NULL))"><InsertParameters>
<asp:Parameter Type="Decimal" Name="ID"></asp:Parameter>
<asp:Parameter Type="String" Name="EMP_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="EMP_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_USER"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="CITY_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="NICK_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="SEX"></asp:Parameter>
<asp:Parameter Type="String" Name="ID_NO"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_TYPE"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="ID_EXPIRED"></asp:Parameter>
<asp:Parameter Type="String" Name="MOBILE_NO"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="DATE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String" Name="PLACE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
373
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_PARENT"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_POSITION"></asp:Parameter>
</InsertParameters>
<UpdateParameters>
<asp:Parameter Type="String" Name="EMP_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="EMP_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_USER"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="CITY_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="NICK_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="SEX"></asp:Parameter>
<asp:Parameter Type="String" Name="ID_NO"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_TYPE"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="ID_EXPIRED"></asp:Parameter>
<asp:Parameter Type="String" Name="MOBILE_NO"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="DATE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String" Name="PLACE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_PARENT"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_POSITION"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_EMP_NAME"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_EMP_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_USER"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_CITY_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_NICK_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="original_SEX"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ID_NO"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_TYPE"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_ID_EXPIRED"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_MOBILE_NO"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_DATE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_PLACE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ADDRESS"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
374
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_PARENT"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_POSITION"></asp:Parameter>
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_EMP_NAME"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_EMP_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_USER"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_CITY_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_NICK_NAME"></asp:Parameter>
<asp:Parameter Type="String" Name="original_SEX"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ID_NO"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_TYPE"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_ID_EXPIRED"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_MOBILE_NO"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_DATE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_PLACE_BIRTH"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ADDRESS"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_PARENT"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_POSITION"></asp:Parameter>
</DeleteParameters>
</asp:SqlDataSource>
</TD></TR></TBODY></TABLE></dx:PanelContent>
</panelcollection>
<LeftEdge>
375
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</LeftEdge>
<HeaderContent>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</HeaderContent>
<ContentPaddings PaddingBottom="10px"
PaddingLeft="4px" PaddingTop="10px" />
<RightEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</RightEdge>
<HeaderRightEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderRightEdge.gif"
VerticalPosition="bottom" />
</HeaderRightEdge>
<HeaderStyle BackColor="White" Height="23px">
<Paddings PaddingBottom="0px" PaddingLeft="2px"
PaddingTop="0px" />
<BorderBottom BorderStyle="None" />
</HeaderStyle>
<Content>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpContentBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</Content>
<HeaderLeftEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderLeftEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</HeaderLeftEdge>
<NoHeaderTopEdge BackColor="#EBF2F4">
</NoHeaderTopEdge>
</dx:ASPxRoundPanel><br />
</div>
</form>
 
</asp:Content>
RegistrasiOwner.aspx.cs
using System;
using System.Data;
using System.Configuration;
376
using
using
using
using
using
using
using
using
using
using
using
using
using
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
CJM.Database.Oracle;
System.Data.OracleClient;
CJM.Reference;
CJM.Project.LGE;
System.Drawing;
DevExpress.Web.ASPxEditors;
public partial class AppModules_Default2 : System.Web.UI.Page
{
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = buzdomain.com)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =blitz.buzdomain.com))); User
Id=buzapps; password=qwerty007;";
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = blitz.co.id)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =buzdev))); User Id=buzapps;
password=qwerty007;";
string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =xronosit))); User
Id=buzapps; password=qwerty007;";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
if (Session["SESS_USER_ID"] == null)
{
Response.Redirect("../LogOut.aspx");
}
//============================= cek caption
=================
if (Session["SESS_LANG"] == "english")
{
Caption1.Text = "Name";
Caption2.Text = "Mobile No";
Caption3.Text = "Sex";
Caption4.Text = "Nick Name";
Caption5.Text = "Date Birth";
Caption6.Text = "Place Birth";
Caption7.Text = "Manage Partner";
Caption8.Text = "User Name";
Caption9.Text = "Password";
Caption10.Text = "ID No";
Caption11.Text = "Type";
Caption12.Text = "Expired Date";
Caption13.Text = "Address";
377
Caption14.Text = "Province";
Caption15.Text = "City";
Caption16.Text = "Register Date";
CaptionUtama.Text = "Owner Registration";
}
if (Session["SESS_LANG"] == "indonesia")
{
Caption1.Text = "Nama";
Caption2.Text = "No. HP";
Caption3.Text = "Jenis Kelamin";
Caption4.Text = "Nama Panggilan";
Caption5.Text = "Tgl. Lahir";
Caption6.Text = "Tempat Lahir";
Caption7.Text = "Manage Partner";
Caption8.Text = "User Name";
Caption9.Text = "Password";
Caption10.Text = "No. Identitas";
Caption11.Text = "Tipe";
Caption12.Text = "Tanggal Habis";
Caption13.Text = "Alamat";
Caption14.Text = "Propinsi";
Caption15.Text = "Kota";
Caption16.Text = "Tgl. Registrasi";
CaptionUtama.Text = "Registrasi Pemilik";
}
PROV_ID.Items.Insert(0, new ListItem("-- chose --",
""));
CITY_ID.Items.Insert(0, new ListItem("-- chose --",
""));
ID_TYPE.Items.Insert(0, new ListItem("-- chose --",
""));
}
}
protected void MOBILE_NO_TextChanged(object sender, EventArgs
e)
{
System.Threading.Thread.Sleep(1000);
string xMOBILE_NO = MOBILE_NO.Text;
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
string querys = " SELECT COUNT(MOBILE_NO) AS JML FROM
EMP_STORE WHERE MOBILE_NO ='" + xMOBILE_NO + "'";
OracleCommand cmd = new OracleCommand(querys, conn);
378
OracleDataReader dc = cmd.ExecuteReader();
if (dc.HasRows == false)
{
throw new Exception();
}
if (dc.Read())
{
string jumlah = dc["JML"].ToString();
if (jumlah.ToString() == "0")
{
CITY_ID.Enabled = true;
PROV_ID.Enabled = true;
NICK_NAME.Enabled = true;
SEX.Enabled = true;
PLACE_BIRTH.Enabled = true;
ADDRESS.Enabled = true;
ID_NO.Enabled = true;
ID_TYPE.Enabled = true;
ID_EXPIRED.Enabled = true;
ASPxButton4.Enabled = true;
ASPxButton3.Enabled = true;
//ASPxGridView1.Enabled = true;
DATE_BIRTH.Enabled = true;
REGISTER_DATE.Enabled = true;
MANAGEPARTNER.Enabled = true;
USERNAME.Enabled = true;
PASSWORD.Enabled = true;
Label1.Text = "Your account available";
}
else
{
CITY_ID.Enabled = false;
PROV_ID.Enabled = false;
NICK_NAME.Enabled = false;
SEX.Enabled = false;
PLACE_BIRTH.Enabled = false;
ADDRESS.Enabled = false;
ID_NO.Enabled = false;
ID_TYPE.Enabled = false;
ID_EXPIRED.Enabled = false;
ASPxButton4.Enabled = false;
ASPxButton3.Enabled = false;
DATE_BIRTH.Enabled = false;
REGISTER_DATE.Enabled = false;
MANAGEPARTNER.Enabled = false;
USERNAME.Enabled = false;
PASSWORD.Enabled = false;
Label1.Text = "Your account already
registered";
379
}
}
}
catch (Exception)
{
}
finally
{
conn.Dispose();
}
}
protected void PROV_ID_SelectedIndexChanged(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
}
//========= Proses Edit & Delete
protected void ASPxGridView1_RowUpdating(object sender,
DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
{
e.Cancel = true;
Response.Redirect("EditRegistrasiOwner.aspx?id_edit=" +
e.Keys);
}
protected void ASPxGridView1_RowDeleting(object sender,
DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
{
e.Cancel = true;
Response.Redirect("EditRegistrasiOwner.aspx?id_delete=" +
e.Keys);
}
//=========== event lookup Grid
protected void ASPxButton1_Click(object sender, EventArgs e)
{
ASPxGridView1.Visible = true;
ASPxButton1.Visible = false;
ASPxButton2.Visible = true;
}
//=========== event Close Grid
protected void ASPxButton2_Click(object sender, EventArgs e)
{
ASPxGridView1.Visible = false;
ASPxButton1.Visible = true;
380
ASPxButton2.Visible = false;
}
//=========== event Save
protected void ASPxButton4_Click(object sender, EventArgs e)
{
string oEMP_NAME = EMP_NAME.Text;
//string oEMP_CODE
= EMP_CODE.Text;
===========================> dibuatkan function
string oCITY_ID = CITY_ID.SelectedItem.Value;
string oPROV_ID = PROV_ID.SelectedItem.Value;
string oNICK_NAME = NICK_NAME.Text;
string oSEX = SEX.SelectedItem.Value;
string oMOBILE_NO = MOBILE_NO.Text;
string oDATE_BIRTH = ForNET.DateToDB(DATE_BIRTH.Text);
string oPLACE_BIRTH = PLACE_BIRTH.Text;
string oADDRESS = ADDRESS.Text;
string oID_NO = ID_NO.Text;
string oID_TYPE = ID_TYPE.SelectedItem.Value;
string oID_EXPIRED = ID_EXPIRED.Text;
if (oID_EXPIRED != "")
{
oID_EXPIRED = ForNET.DateToDB(oID_EXPIRED);
}
else
{
oID_EXPIRED = "''";
}
string oID_POSITION = "UTILITY_PKG.GET_IDOWNER('OWNER')";
string oREGISTER_DATE =
ForNET.DateToDB(REGISTER_DATE.Text);
string
string
string
string
oMANAGE_PARTNER = MANAGEPARTNER.SelectedItem.Value;
oPASSWORD = PASSWORD.Text;
oUSERNAME = USERNAME.Text;
oApplied = "Y";
//---------------------------------------------------------------------//INSERT KE TABLE EMP_STORE
//----------------------------------------------------------------------string myQueryCity = "INSERT INTO EMP_STORE" +
"
(EMP_NAME,CITY_ID,PROV_ID,NICK_NAME,SEX,MOBILE_NO,DATE_BIRTH," +
"PLACE_BIRTH,ADDRESS,INPUT_BY,UPDATE_BY,COMP_ID,ID_POSITION,
ID_NO, ID_TYPE, ID_EXPIRED,REGISTER_DATE, MANAGE_PARTNER) " +
" VALUES (" +
"'" + oEMP_NAME + "'," +
"'" + oCITY_ID + "'," +
381
"'" + oPROV_ID + "'," +
"'" + oNICK_NAME + "'," +
"'" + oSEX + "'," +
"'" + oMOBILE_NO + "'," +
"" + oDATE_BIRTH + "," +
"'" + oPLACE_BIRTH + "'," +
"'" + oADDRESS + "'," +
"'" + Session["SESS_USER_ID"] + "',"
+
"'" + Session["SESS_USER_ID"] + "',"
+
"'" + Session["SESS_COMP_ID"] + "',"
+
"" + oID_POSITION + "," +
"'" + oID_NO + "'," +
"'" + oID_TYPE + "'," +
"" + oID_EXPIRED + "," +
"" + oREGISTER_DATE + "," +
"'" + oMANAGE_PARTNER + "'" +
")";
bool suksesInsertCity =
ConnOracle.ExecNonQueryConnOra(myQueryCity);
if (suksesInsertCity)
{
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
// --------Selected emp_store id_user where
MOBILE_NO=oMOBILE_NO
//---------------- run prosedur
utility_pkg.insert_user(id_user, user_name, comp_id);
try
{
conn.Open();
string querys = " SELECT ID_USER FROM EMP_STORE
WHERE MOBILE_NO ='" + oMOBILE_NO + "'";
OracleCommand cmd = new OracleCommand(querys,
conn);
OracleDataReader dc = cmd.ExecuteReader();
if (dc.HasRows == false)
{
throw new Exception();
}
if (dc.Read())
{
if (dc["ID_USER"].ToString() != "")
{
string iduser = dc["ID_USER"].ToString();
string conStr =
ConfigurationManager.ConnectionStrings["ConnectionString"].Connect
ionString;
382
OracleConnection conNya = new
OracleConnection(conStr);
OracleCommand objCmd = new
OracleCommand();
objCmd.Connection = conNya;
objCmd.CommandText =
"utility_pkg.insert_user";
objCmd.CommandType =
CommandType.StoredProcedure;
objCmd.Parameters.Add("i_ID",
OracleType.Number).Value = iduser;
objCmd.Parameters.Add("i_username",
OracleType.VarChar, 30).Value = oUSERNAME;
objCmd.Parameters.Add("i_compID",
OracleType.Number).Value = Session["SESS_COMP_ID"];
objCmd.Parameters.Add("i_fullname",
OracleType.VarChar, 100).Value = oEMP_NAME;
try
{
conNya.Open();
objCmd.ExecuteNonQuery();
}
catch (Exception ex)
{
}
finally
{
conNya.Close();
}
}
}
}
catch (Exception) { }
finally
{
conn.Dispose();
}
//EMP_NAME.Text = "";
////CITY_ID.SelectedItem.Text = "";
////PROV_ID.SelectedItem.Value = "";
//NICK_NAME.Text = "";
//SEX.SelectedItem.Selected = false;
//MOBILE_NO.Text = "";
//PLACE_BIRTH.Text = "";
//ADDRESS.Text = "";
//ID_NO.Text = "";
////ID_TYPE.SelectedItem.Text = "";
383
//ID_EXPIRED.Text = "";
//REGISTER_DATE.Text = "";
//USERNAME.Text = "";
//Label1.Text = "";
//CITY_ID.Enabled = false;
//PROV_ID.Enabled = false;
//NICK_NAME.Enabled = false;
//SEX.Enabled = false;
//PLACE_BIRTH.Enabled = false;
//ADDRESS.Enabled = false;
//ID_NO.Enabled = false;
//ID_TYPE.Enabled = false;
//ID_EXPIRED.Enabled = false;
//ASPxButton4.Enabled = false;
//ASPxButton3.Enabled = false;
//DATE_BIRTH.Enabled = false;
//REGISTER_DATE.Enabled = false;
//MANAGEPARTNER.Enabled = false;
//USERNAME.Enabled = false;
//PASSWORD.Enabled = false;
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "confirm('Insert Success, do you want continue to
Store Registration ?'); if(Ok){window.location.href =
'RegistrasiTokoOwner.aspx'} else{window.location.href =
'Default.aspx'};", true);
//ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"ShowConfirmation.setTimeout(\"alert('Insert Success.')\", 0);",
true);
}
else
{
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "alert('Insert Failed'); window.location.href =
'RegistrasiOwner.aspx';", true);
//ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed.')\", 0);", true);
}
}
//========== event Cancel
protected void ASPxButton3_Click(object sender, EventArgs e)
{
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "alert('Thankyou'); window.location.href =
'Default.aspx';", true);
//Response.Redirect("Default.aspx");
}
}
384
RegistrasiToko.aspx
<%@ Page Language="C#" MasterPageFile="MasterPage.master"
AutoEventWireup="true" CodeFile="RegistrasiToko.aspx.cs"
Inherits="AppModules_RegToko" Title="Sales Management System"
EnableEventValidation="false" %>
<%@ Register Assembly="DevExpress.Xpo.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Xpo" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
<div style="text-align: left">
<!-- ======================== TABLE UTAMA
=========================== -->
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
BackColor="#EBF2F4"
CssFilePath="~/App_Themes/Glass/{0}/styles.css"
CssPostfix="Glass" HeaderText="Store Registration"
SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css"
Width="200px">
<leftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"></Background
Image>
</leftedge>
<headercontent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpHeaderBack.gif"></BackgroundIma
ge>
</headercontent>
<contentpaddings PaddingBottom="10px"
PaddingLeft="4px" PaddingTop="10px"></contentpaddings>
<rightedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"></Background
Image>
385
</rightedge>
<headerrightedge>
<BackgroundImage VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpHeaderRightEdge.gif"></Backgrou
ndImage>
</headerrightedge>
<border bordercolor="#7EACB1" borderstyle="Solid"
borderwidth="1px"></border>
<headerstyle backcolor="White" Height="23px">
<BorderBottom BorderStyle="None"></BorderBottom>
<Paddings PaddingBottom="0px" PaddingLeft="2px"
PaddingTop="0px" />
</headerstyle>
<headerleftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="bottom"
ImageUrl="~/App_Themes/Glass/Web/rpHeaderLeftEdge.gif"></Backgroun
dImage>
</headerleftedge>
<bottomedge BackColor="#D7E9F1">
</bottomedge>
<panelcollection>
<dx:PanelContent runat="server"><TABLE width="900"><TBODY><TR><TD
colSpan=6><asp:ScriptManager runat="server"
ID="ScriptManager1"></asp:ScriptManager>
<asp:Label runat="server" Width="363px" ID="CaptionUtama"
Visible="False"></asp:Label>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption1"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel1"><ContentTemplate>
<dx:ASPxComboBox id="ID_EMP" runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
DataSourceID="Table_emp"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
ShowShadow="False" EnableIncrementalFiltering="True"
LoadingPanelImagePosition="Top" TextField="EMP_NAME"
ValueField="ID" ValueType="System.String"
__designer:wfdid="w234"><Columns>
<dx:ListBoxColumn FieldName="EMP_NAME" Caption="Name"
Name="Name"></dx:ListBoxColumn>
<dx:ListBoxColumn FieldName="ID" Caption="ID" Visible="False"
Name="ID"></dx:ListBoxColumn>
<dx:ListBoxColumn FieldName="MOBILE_NO" Caption="Mobile
No"></dx:ListBoxColumn>
</Columns>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
386
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator1" runat="server" Width="216px"
__designer:wfdid="w235" ControlToValidate="ID_EMP"
ErrorMessage="Owner Name can't
empty"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 129px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption7"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel7"><ContentTemplate>
<asp:TextBox id="ADDRESS" tabIndex=8 runat="server"
__designer:wfdid="w238" TextMode="MultiLine" ReadOnly="True"
Enabled="False"></asp:TextBox> 
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption2"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><SPAN style="FONT-SIZE: 10pt; COLOR:
#ff0033"><asp:UpdatePanel runat="server"
ID="UpdatePanel2"><ContentTemplate>
<asp:TextBox id="STORE_NAME" tabIndex=2 runat="server"
__designer:wfdid="w241"></asp:TextBox> <BR
/><asp:RequiredFieldValidator id="RequiredFieldValidator2"
runat="server" Width="215px" __designer:wfdid="w242"
ControlToValidate="STORE_NAME" ErrorMessage="Shop name can't
empty"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</SPAN></TD><TD style="WIDTH: 129px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption8"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel9"><ContentTemplate>
<asp:TextBox id="FLOOR" tabIndex=9 runat="server" Width="47px"
__designer:wfdid="w245"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption3"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><SPAN style="FONT-SIZE: 10pt; COLOR:
#ff0033"><asp:UpdatePanel runat="server"
ID="UpdatePanel3"><ContentTemplate>
<asp:DropDownList id="STORE_TYPE" tabIndex=3 runat="server"
DataSourceID="Table_parameter_value" __designer:wfdid="w248"
DataTextField="PARAMETER_VALUE"
DataValueField="ID"></asp:DropDownList> <BR
387
/><asp:RequiredFieldValidator id="RequiredFieldValidator3"
runat="server" Width="213px" __designer:wfdid="w249"
ControlToValidate="STORE_TYPE" ErrorMessage="Type can't
empty"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</SPAN></TD><TD style="WIDTH: 129px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption9"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel10"><ContentTemplate>
<asp:TextBox id="BLOCK_STORE" tabIndex=10 runat="server"
Width="47px" __designer:wfdid="w252"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption4"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel4"><ContentTemplate>
<dx:ASPxComboBox id="ID_MALL" tabIndex=4 runat="server"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
DataSourceID="table_mall"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
ShowShadow="False" EnableIncrementalFiltering="True"
LoadingPanelImagePosition="Top" TextField="MALL_NAME"
ValueField="ID" ValueType="System.String" __designer:wfdid="w255"
IncrementalFilteringDelay="10"
OnSelectedIndexChanged="ID_MALL_SelectedIndexChanged1"
AutoPostBack="True">
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxComboBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator4" runat="server" Width="212px"
__designer:wfdid="w256" ControlToValidate="ID_MALL"
ErrorMessage="Mall can't empty"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress1"
AssociatedUpdatePanelID="UpdatePanel4"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress1" runat="server"
Width="150px" ImageUrl="~/images/wait.gif"
388
__designer:wfdid="w258"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD><TD style="WIDTH: 129px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption10"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel8"><ContentTemplate>
<asp:TextBox id="BLOCK_NO" tabIndex=11 runat="server" Width="47px"
__designer:wfdid="w261"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption5"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel5"><ContentTemplate>
<asp:TextBox id="TextBox1" tabIndex=5 runat="server"
__designer:wfdid="w264" ReadOnly="True"
Enabled="False"></asp:TextBox> <dx:ASPxComboBox id="combo_prov"
tabIndex=5 runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
ShowShadow="False" LoadingPanelImagePosition="Top"
ValueType="System.String" __designer:wfdid="w265"
OnSelectedIndexChanged="combo_prov_SelectedIndexChanged"
AutoPostBack="True" Visible="False">
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxComboBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator5" runat="server" Width="213px"
__designer:wfdid="w266" ControlToValidate="PROV_ID"
ErrorMessage="Province can't empty"></asp:RequiredFieldValidator>
<asp:TextBox id="PROV_ID" tabIndex=5 runat="server"
__designer:wfdid="w267" Enabled="False"
Visible="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress2"
AssociatedUpdatePanelID="UpdatePanel5"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress2" runat="server"
Width="150px" ImageUrl="~/images/wait.gif"
389
__designer:wfdid="w269"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD><TD style="WIDTH: 129px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption11"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel11"><ContentTemplate>
<asp:TextBox id="PHONE" tabIndex=12 runat="server"
__designer:wfdid="w272"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top
align="right"><asp:Label runat="server" Width="150px"
ID="Caption6"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel6"><ContentTemplate>
<asp:TextBox id="TextBox2" tabIndex=6 runat="server"
__designer:wfdid="w275" ReadOnly="True"
Enabled="False"></asp:TextBox> <dx:ASPxComboBox id="combo_city"
tabIndex=6 runat="server" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
ShowShadow="False" LoadingPanelImagePosition="Top"
ValueType="System.String" __designer:wfdid="w276" Visible="False">
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxComboBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator6" runat="server" Width="214px"
__designer:wfdid="w277" ControlToValidate="CITY_ID"
ErrorMessage="City can't empty"></asp:RequiredFieldValidator>
<asp:TextBox id="CITY_ID" tabIndex=6 runat="server"
__designer:wfdid="w278" Enabled="False"
Visible="False"></asp:TextBox> 
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 129px" vAlign=top align="right"><asp:Label
runat="server" Width="150px" ID="Caption12"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><dx:ASPxDateEdit runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" EditFormatString="dd/MM/yy" EditFormat="Custom"
390
ID="Reg_date" ShowShadow="False"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css" TabIndex="7">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<CalendarProperties>
<FooterStyle Spacing="17px"></FooterStyle>
<HeaderStyle Spacing="1px"></HeaderStyle>
</CalendarProperties>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
</dx:ASPxDateEdit>
</TD></TR>
<tr>
<td style="width: 122px; height: 26px" valign="top">
</td>
<td style="width: 7px; height: 26px" valign="top">
</td>
<td style="width: 289px; height: 26px" valign="top">
</td>
<td style="width: 129px; height: 26px" valign="top">
</td>
<td style="width: 6px; height: 26px" valign="top">
</td>
<td style="width: 671px; height: 26px" valign="top">
</td>
</tr>
<tr>
<td style="width: 122px" valign="top">
</td>
<td style="width: 7px" valign="top">
</td>
<td style="width: 289px" valign="top">
</td>
<td align="right" style="width: 129px" valign="top">
<dx:ASPxButton ID="ASPxButton4" runat="server"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
CssPostfix="Office2003Silver"
OnClick="ASPxButton4_Click"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
Text="Save" Width="80px">
</dx:ASPxButton>
</td>
<td style="width: 6px" valign="top">
</td>
<td style="width: 671px" valign="top">
391
<dx:ASPxButton ID="ASPxButton3" runat="server"
CausesValidation="False"
CssFilePath="~/App_Themes/Office2003Silver/{0}/styles.css"
CssPostfix="Office2003Silver"
OnClick="ASPxButton3_Click"
SpriteCssFilePath="~/App_Themes/Office2003Silver/{0}/sprite.css"
Text="Cancel" Width="80px">
</dx:ASPxButton>
</td>
</tr>
<TR><TD colSpan=7 style="width: 935px">
<HR style="WIDTH: 101%" color=#006fae />
 </TD></TR><TR><TD colSpan=7 style="width: 935px; height:
2px"><asp:UpdatePanel runat="server"
ID="UpdatePanel12"><ContentTemplate>
<dx:ASPxGridView id="ASPxGridView1" runat="server" Width="900px"
DataSourceID="SqlDataSource1" __designer:wfdid="w499"
Visible="False" OnRowUpdating="ASPxGridView1_RowUpdating"
KeyFieldName="ID" AutoGenerateColumns="False"
OnRowDeleting="ASPxGridView1_RowDeleting">
<SettingsPager PageSize="20" Visible="False"
Position="Top"></SettingsPager>
<Columns>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="0"><DataItemTemplate>
<a href="EditRegistrasiToko.aspx?id_edit=<%#Eval
("ID")%>">Edit</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="0"><DataItemTemplate>
<a href="EditRegistrasiToko.aspx?id_delete=<%#Eval
("ID")%>">Delete</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataTextColumn VisibleIndex="1"
FieldName="ID"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2" FieldName="STORE_CODE"
Caption="Store Code"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3" FieldName="STORE_NAME"
Caption="Store Name"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4"
FieldName="City"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="5"
FieldName="Province"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="6"
FieldName="Address"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="7"
FieldName="No"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="8"
FieldName="Block"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="9"
FieldName="Floor"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="10"
FieldName="Phone"></dx:GridViewDataTextColumn>
392
<dx:GridViewDataTextColumn VisibleIndex="11"
FieldName="STORE_TYPE" Caption="Store
Type"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="12"
FieldName="OWNER_NAME" Caption="Owner
Name"></dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn VisibleIndex="13"
FieldName="REGISTER_DATE" Caption="Register
Date"></dx:GridViewDataDateColumn>
</Columns>
<Settings ShowGroupPanel="True" ShowVerticalScrollBar="True"
ShowFilterRow="True" ShowHorizontalScrollBar="True"></Settings>
</dx:ASPxGridView>
</ContentTemplate>
</asp:UpdatePanel><asp:UpdatePanel ID="UpdatePanel14"
runat="server"><contenttemplate>
<dx:ASPxButton id="ASPxButton1" runat="server" Width="100px"
CssPostfix="Office2003Olive"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
Text="Open Grid" CausesValidation="False"
OnClick="ASPxButton1_Click"></dx:ASPxButton> <BR /><dx:ASPxButton
id="ASPxButton2" runat="server" Width="100px"
CssPostfix="Office2003Olive"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
Visible="False" Text="Close Grid" CausesValidation="False"
OnClick="ASPxButton2_Click"></dx:ASPxButton>
</contenttemplate>
</asp:UpdatePanel><asp:SqlDataSource runat="server"
ID="Table_Store" SelectCommand="SELECT * FROM
"GNRL_REF_STORE""
OldValuesParameterFormatString="original_{0}"
ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM
"GNRL_REF_STORE" WHERE "ID" = :original_ID AND
(("STORE_CODE" = :original_STORE_CODE) OR
("STORE_CODE" IS NULL AND :original_STORE_CODE IS NULL))
AND (("ID_EMP" = :original_ID_EMP) OR
("ID_EMP" IS NULL AND :original_ID_EMP IS NULL)) AND
(("ID_MALL" = :original_ID_MALL) OR ("ID_MALL"
IS NULL AND :original_ID_MALL IS NULL)) AND
(("STORE_NAME" = :original_STORE_NAME) OR
("STORE_NAME" IS NULL AND :original_STORE_NAME IS NULL))
AND (("PROV_ID" = :original_PROV_ID) OR
("PROV_ID" IS NULL AND :original_PROV_ID IS NULL)) AND
(("CITY_ID" = :original_CITY_ID) OR ("CITY_ID"
IS NULL AND :original_CITY_ID IS NULL)) AND (("FLOOR" =
:original_FLOOR) OR ("FLOOR" IS NULL AND :original_FLOOR
IS NULL)) AND (("BLOCK_STORE" = :original_BLOCK_STORE)
OR ("BLOCK_STORE" IS NULL AND :original_BLOCK_STORE IS
NULL)) AND (("PHONE" = :original_PHONE) OR
("PHONE" IS NULL AND :original_PHONE IS NULL)) AND
(("INPUT_DATE" = :original_INPUT_DATE) OR
("INPUT_DATE" IS NULL AND :original_INPUT_DATE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
(("UPDATE_DATE" = :original_UPDATE_DATE) OR
("UPDATE_DATE" IS NULL AND :original_UPDATE_DATE IS
393
NULL)) AND (("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))
AND (("COMP_ID" = :original_COMP_ID) OR
("COMP_ID" IS NULL AND :original_COMP_ID IS NULL)) AND
(("STORE_TYPE" = :original_STORE_TYPE) OR
("STORE_TYPE" IS NULL AND :original_STORE_TYPE IS NULL))
AND (("STORE_SEGMENT" = :original_STORE_SEGMENT) OR
("STORE_SEGMENT" IS NULL AND :original_STORE_SEGMENT IS
NULL)) AND (("BLOCK_NO" = :original_BLOCK_NO) OR
("BLOCK_NO" IS NULL AND :original_BLOCK_NO IS NULL)) AND
(("ADDRESS" = :original_ADDRESS) OR ("ADDRESS"
IS NULL AND :original_ADDRESS IS NULL))" InsertCommand="INSERT
INTO "GNRL_REF_STORE" ("ID",
"STORE_CODE", "ID_EMP", "ID_MALL",
"STORE_NAME", "PROV_ID", "CITY_ID",
"FLOOR", "BLOCK_STORE", "PHONE",
"INPUT_DATE", "INPUT_BY",
"UPDATE_DATE", "UPDATE_BY",
"COMP_ID", "STORE_TYPE",
"STORE_SEGMENT", "BLOCK_NO",
"ADDRESS") VALUES (:ID, :STORE_CODE, :ID_EMP, :ID_MALL,
:STORE_NAME, :PROV_ID, :CITY_ID, :FLOOR, :BLOCK_STORE, :PHONE,
:INPUT_DATE, :INPUT_BY, :UPDATE_DATE, :UPDATE_BY, :COMP_ID,
:STORE_TYPE, :STORE_SEGMENT, :BLOCK_NO, :ADDRESS)"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" UpdateCommand="UPDATE "GNRL_REF_STORE" SET
"STORE_CODE" = :STORE_CODE, "ID_EMP" =
:ID_EMP, "ID_MALL" = :ID_MALL, "STORE_NAME" =
:STORE_NAME, "PROV_ID" = :PROV_ID, "CITY_ID" =
:CITY_ID, "FLOOR" = :FLOOR, "BLOCK_STORE" =
:BLOCK_STORE, "PHONE" = :PHONE, "INPUT_DATE" =
:INPUT_DATE, "INPUT_BY" = :INPUT_BY,
"UPDATE_DATE" = :UPDATE_DATE, "UPDATE_BY" =
:UPDATE_BY, "COMP_ID" = :COMP_ID, "STORE_TYPE"
= :STORE_TYPE, "STORE_SEGMENT" = :STORE_SEGMENT,
"BLOCK_NO" = :BLOCK_NO, "ADDRESS" = :ADDRESS
WHERE "ID" = :original_ID AND (("STORE_CODE" =
:original_STORE_CODE) OR ("STORE_CODE" IS NULL AND
:original_STORE_CODE IS NULL)) AND (("ID_EMP" =
:original_ID_EMP) OR ("ID_EMP" IS NULL AND
:original_ID_EMP IS NULL)) AND (("ID_MALL" =
:original_ID_MALL) OR ("ID_MALL" IS NULL AND
:original_ID_MALL IS NULL)) AND (("STORE_NAME" =
:original_STORE_NAME) OR ("STORE_NAME" IS NULL AND
:original_STORE_NAME IS NULL)) AND (("PROV_ID" =
:original_PROV_ID) OR ("PROV_ID" IS NULL AND
:original_PROV_ID IS NULL)) AND (("CITY_ID" =
:original_CITY_ID) OR ("CITY_ID" IS NULL AND
:original_CITY_ID IS NULL)) AND (("FLOOR" =
:original_FLOOR) OR ("FLOOR" IS NULL AND :original_FLOOR
IS NULL)) AND (("BLOCK_STORE" = :original_BLOCK_STORE)
OR ("BLOCK_STORE" IS NULL AND :original_BLOCK_STORE IS
NULL)) AND (("PHONE" = :original_PHONE) OR
("PHONE" IS NULL AND :original_PHONE IS NULL)) AND
(("INPUT_DATE" = :original_INPUT_DATE) OR
("INPUT_DATE" IS NULL AND :original_INPUT_DATE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
394
(("UPDATE_DATE" = :original_UPDATE_DATE) OR
("UPDATE_DATE" IS NULL AND :original_UPDATE_DATE IS
NULL)) AND (("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))
AND (("COMP_ID" = :original_COMP_ID) OR
("COMP_ID" IS NULL AND :original_COMP_ID IS NULL)) AND
(("STORE_TYPE" = :original_STORE_TYPE) OR
("STORE_TYPE" IS NULL AND :original_STORE_TYPE IS NULL))
AND (("STORE_SEGMENT" = :original_STORE_SEGMENT) OR
("STORE_SEGMENT" IS NULL AND :original_STORE_SEGMENT IS
NULL)) AND (("BLOCK_NO" = :original_BLOCK_NO) OR
("BLOCK_NO" IS NULL AND :original_BLOCK_NO IS NULL)) AND
(("ADDRESS" = :original_ADDRESS) OR ("ADDRESS"
IS NULL AND :original_ADDRESS IS NULL))"><InsertParameters>
<asp:Parameter Type="Decimal" Name="ID"></asp:Parameter>
<asp:Parameter Type="String" Name="STORE_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_EMP"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_MALL"></asp:Parameter>
<asp:Parameter Type="String" Name="STORE_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="CITY_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="FLOOR"></asp:Parameter>
<asp:Parameter Type="String" Name="BLOCK_STORE"></asp:Parameter>
<asp:Parameter Type="String" Name="PHONE"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="STORE_TYPE"></asp:Parameter>
<asp:Parameter Type="String" Name="BLOCK_NO"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"></asp:Parameter>
</InsertParameters>
<UpdateParameters>
<asp:Parameter Type="String" Name="STORE_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_EMP"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_MALL"></asp:Parameter>
<asp:Parameter Type="String" Name="STORE_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="CITY_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="FLOOR"></asp:Parameter>
<asp:Parameter Type="String" Name="BLOCK_STORE"></asp:Parameter>
<asp:Parameter Type="String" Name="PHONE"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="STORE_TYPE"></asp:Parameter>
<asp:Parameter Type="String" Name="BLOCK_NO"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_STORE_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_EMP"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_MALL"></asp:Parameter>
395
<asp:Parameter Type="String"
Name="original_STORE_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_CITY_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_FLOOR"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_BLOCK_STORE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_PHONE"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_STORE_TYPE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_BLOCK_NO"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ADDRESS"></asp:Parameter>
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_STORE_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_EMP"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_MALL"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_STORE_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_CITY_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_FLOOR"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_BLOCK_STORE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_PHONE"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_COMP_ID"></asp:Parameter>
396
<asp:Parameter Type="Decimal"
Name="original_STORE_TYPE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_BLOCK_NO"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ADDRESS"></asp:Parameter>
</DeleteParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_parameter_value"
SelectCommand="SELECT * FROM "GNRL_PARAMETER_VALUE"
WHERE ("PAR_ID" = :PAR_ID)" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"><SelectParameters>
<asp:Parameter Type="Decimal" DefaultValue="6"
Name="PAR_ID"></asp:Parameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_emp"
SelectCommand="SELECT "ID", "EMP_NAME",
"EMP_CODE", "ID_USER", "SEX",
"MOBILE_NO", "ADDRESS", "COMP_ID"
FROM "EMP_STORE" ORDER BY "EMP_NAME" ASC"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="table_mall"
SelectCommand="SELECT "ID", "PROV_ID",
"MALL_NAME", "ADDRESS", "CITY_ID",
"TELP_NO", "INACTIVE" FROM
"GNRL_REF_MALL" WHERE ("INACTIVE" = :INACTIVE)
ORDER BY "MALL_NAME"" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"><SelectParameters>
<asp:Parameter Type="String" DefaultValue="N"
Name="INACTIVE"></asp:Parameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="SqlDataSource1"
SelectCommand="SELECT "ID", "Store Code" AS
Store_Code, "Store name" AS Store_name,
"City", "Province", "Address",
"No", "Block", "Floor",
"Phone", "Store Type" AS Store_Type,
"Owner Name" AS Owner_Name, "Register Date" AS
Register_Date FROM "OWNER_STORE_VIEW" ORDER BY
"ID" DESC" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="table_prov"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="table_city"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
397
</TD></TR></TBODY></TABLE></dx:PanelContent>
</panelcollection>
<noheadertopedge backcolor="#EBF2F4">
</noheadertopedge>
<Content>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpContentBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</Content>
</dx:ASPxRoundPanel><br />
</div>
</form>
 
</asp:Content>
RegistrasiToko.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CJM.Database.Oracle;
using System.Data.OracleClient;
using CJM.Reference;
using CJM.Project.LGE;
using System.Drawing;
using DevExpress.Web.ASPxEditors;
//using DevExpress.Web.ASPxEditors;
public partial class AppModules_RegToko : System.Web.UI.Page
{
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = buzdomain.com)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =blitz.buzdomain.com))); User
Id=buzapps; password=qwerty007;";
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = blitz.co.id)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =buzdev))); User Id=buzapps;
password=qwerty007;";
string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =xronosit))); User
Id=buzapps; password=qwerty007;";
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_USER_ID"] == null)
398
{
Response.Redirect("../LogOut.aspx");
}
//============================= cek caption
=================
if (Session["SESS_LANG"] == "english")
{
Caption1.Text = "Owner";
Caption2.Text = "Store Name";
Caption3.Text = "Type";
Caption4.Text = "Mall";
Caption5.Text = "Province";
Caption6.Text = "City";
Caption7.Text = "Address";
Caption8.Text = "Floor";
Caption9.Text = "Block";
Caption10.Text = "No";
Caption11.Text = "Phone";
CaptionUtama.Text = "Store Registration";
Caption12.Text = "Register Date";
}
if (Session["SESS_LANG"] == "indonesia")
{
Caption1.Text = "Nama Pemilik";
Caption2.Text = "Nama Toko";
Caption3.Text = "Tipe";
Caption4.Text = "Mall";
Caption5.Text = "Propinsi";
Caption6.Text = "Kota";
Caption7.Text = "Alamat";
Caption8.Text = "Lantai";
Caption9.Text = "Block";
Caption10.Text = "No";
Caption11.Text = "Telephon";
CaptionUtama.Text = "Store Registration";
Caption12.Text = "Tgl. Registrasi";
}
}
protected void ID_MALL_SelectedIndexChanged1(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string xID_MALL = ID_MALL.SelectedItem.Value.ToString();
//Response.Redirect("RegistrasiToko.aspx?mall="
+xID_MALL);
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
string query = " select a.MALL_NAME, a.PROV_ID,
a.CITY_ID, a.ADDRESS, b.PROV_NAME, c.CITY_NAME" +
399
" from GNRL_REF_MALL a,
GNRL_REF_PROVINCE b, GNRL_REF_CITY c" +
" where " +
"a.ID='" + xID_MALL + "' and a.PROV_ID
= b.ID and a.CITY_ID = c.ID";
OracleCommand cmd = new OracleCommand(query, conn);
OracleDataReader dd = cmd.ExecuteReader();
if (dd.HasRows == false)
{
throw new Exception();
}
if (dd.Read())
{
if (dd["MALL_NAME"].ToString() != "ROAD AREA")
{
PROV_ID.Enabled = true;
CITY_ID.Enabled = true;
TextBox1.Enabled = true;
TextBox2.Enabled = true;
ADDRESS.Enabled = true;
TextBox1.Enabled
TextBox2.Enabled
TextBox1.Visible
TextBox2.Visible
=
=
=
=
combo_city.Visible
combo_city.Enabled
combo_prov.Visible
combo_prov.Enabled
true;
true;
true;
true;
=
=
=
=
false;
false;
false;
false;
RequiredFieldValidator5.Enabled = true;
RequiredFieldValidator6.Enabled = true;
PROV_ID.Text = dd["PROV_ID"].ToString();
CITY_ID.Text = dd["CITY_ID"].ToString();
TextBox1.Text = dd["PROV_NAME"].ToString();
TextBox2.Text = dd["CITY_NAME"].ToString();
ADDRESS.Text = dd["ADDRESS"].ToString();
}
if (dd["MALL_NAME"].ToString() == "ROAD AREA")
{
PROV_ID.Enabled = false;
CITY_ID.Enabled = false;
PROV_ID.Visible = false;
CITY_ID.Visible = false;
ADDRESS.Enabled = true;
ADDRESS.ReadOnly = false;
TextBox1.Enabled
TextBox2.Enabled
TextBox1.Visible
TextBox2.Visible
=
=
=
=
false;
false;
false;
false;
400
combo_city.Visible
combo_city.Enabled
combo_prov.Visible
combo_prov.Enabled
=
=
=
=
true;
true;
true;
true;
RequiredFieldValidator5.Enabled = false;
RequiredFieldValidator6.Enabled = false;
table_prov.SelectCommand = "SELECT ID,
PROV_NAME FROM gnrl_ref_province order by PROV_NAME ASC";
combo_prov.DataSource = table_prov;
combo_prov.TextField = "PROV_NAME";
combo_prov.ValueField = "ID";
combo_prov.DataBind();
combo_prov.Items.Insert(0, new ListEditItem("- chose --", " "));
}
dd.Dispose();
cmd.Dispose();
}
}
catch (Exception)
{
}
finally
{
conn.Dispose();
}
}
protected void combo_prov_SelectedIndexChanged(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string comb_prov =
combo_prov.SelectedItem.Value.ToString();
table_city.SelectCommand = "SELECT ID, CITY_NAME FROM
gnrl_ref_city WHERE prov_id = " + comb_prov + " ORDER BY CITY_NAME
ASC";
combo_city.DataSource = table_city;
combo_city.TextField = "CITY_NAME";
combo_city.ValueField = "ID";
combo_city.DataBind();
combo_city.Items.Insert(0, new ListEditItem("-- chose --",
" "));
}
//========= Proses Edit & Delete
protected void ASPxGridView1_RowUpdating(object sender,
DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
{
401
e.Cancel = true;
Response.Redirect("EditRegistrasiToko.aspx?id_edit=" +
e.Keys);
}
protected void ASPxGridView1_RowDeleting(object sender,
DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
{
e.Cancel = true;
Response.Redirect("EditRegistrasiToko.aspx?id_delete=" +
e.Keys);
}
//=========== event lookup Grid
protected void ASPxButton1_Click(object sender, EventArgs e)
{
ASPxGridView1.Visible = true;
ASPxButton2.Visible = true;
ASPxButton1.Visible = false;
}
//=========== event Close Grid
protected void ASPxButton2_Click(object sender, EventArgs e)
{
ASPxGridView1.Visible = false;
ASPxButton2.Visible = false;
ASPxButton1.Visible = true;
}
//=========== event Save
protected void ASPxButton4_Click(object sender, EventArgs e)
{
if (ID_MALL.SelectedItem.Text == "ROAD AREA")
{
string sPROV_ID =
combo_prov.SelectedItem.Value.ToString();
string sCITY_ID =
combo_city.SelectedItem.Value.ToString();
string oSTORE_NAME = STORE_NAME.Text;
string oFLOOR = FLOOR.Text;
string oBLOCK_STORE = BLOCK_STORE.Text;
string oPHONE = PHONE.Text;
string oSTORE_TYPE = STORE_TYPE.SelectedItem.Value;
string oBLOCK_NO = BLOCK_NO.Text;
string oADDRESS = ADDRESS.Text;
string oDATE_REG = ForNET.DateToDB(Reg_date.Text);
//---------------------------------------------------------------------//INSERT KE TABLE GNRL_REF_STORE dengan kondisi MALL
== ROAD AREA
402
//----------------------------------------------------------------------string myQueryCity = "INSERT INTO GNRL_REF_STORE" +
"
(ID_EMP,ID_MALL,STORE_NAME,PROV_ID,CITY_ID,FLOOR,BLOCK_STORE,PHONE
,INPUT_BY,UPDATE_BY,COMP_ID," +
"STORE_TYPE,BLOCK_NO,ADDRESS,REGISTER_DATE)" +
" VALUES(" +
"'" + ID_EMP.SelectedItem.Value +
"'," +
"'" + ID_MALL.SelectedItem.Value
+ "'," +
"'" + oSTORE_NAME + "'," +
"'" + sPROV_ID + "'," +
"'" + sCITY_ID + "'," +
"'" + oFLOOR + "'," +
"'" + oBLOCK_STORE + "'," +
"'" + oPHONE + "'," +
"'" + Session["SESS_USER_ID"] +
"'," +
"'" + Session["SESS_USER_ID"] +
"'," +
"'" + Session["SESS_COMP_ID"] +
"'," +
"'" + oSTORE_TYPE + "'," +
"'" + oBLOCK_NO + "'," +
"'" + oADDRESS + "'," +
"" + oDATE_REG + "" +
")";
bool suksesInsertCity =
ConnOracle.ExecNonQueryConnOra(myQueryCity);
if (suksesInsertCity)
{
//STORE_NAME.Text = "";
//FLOOR.Text = "";
//BLOCK_STORE.Text = "";
//PHONE.Text = "";
//STORE_TYPE.SelectedItem.Text = "";
//BLOCK_NO.Text = "";
//ADDRESS.Text = "";
//combo_city.SelectedItem.Text = "";
//combo_prov.SelectedItem.Text = "";
//Reg_date.Text = "";
//ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Success.')\", 0);", true);
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "confirm('Insert Success, do you want continue to
Store Registration ?'); if(Ok){window.location.href =
'RegistrasiToko.aspx'} else{window.location.href =
'Default.aspx'};", true);
}
if (combo_prov.Enabled == false)
403
{
//STORE_NAME.Text = "";
//FLOOR.Text = "";
//BLOCK_STORE.Text = "";
//PHONE.Text = "";
//STORE_TYPE.SelectedItem.Text = "";
//BLOCK_NO.Text = "";
//ADDRESS.Text = "";
//combo_city.SelectedItem.Text = "";
//combo_prov.SelectedItem.Text = "";
//Reg_date.Text = "";
//ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed.')\", 0);", true);
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "confirm('Insert Success, do you want continue to
Store Registration ?'); if(Ok){window.location.href =
'RegistrasiToko.aspx'} else{window.location.href =
'Default.aspx'};", true);
}
}
else
{
string sPROV_ID = PROV_ID.Text;
string sCITY_ID = CITY_ID.Text;
string
string
string
string
string
string
string
string
oSTORE_NAME = STORE_NAME.Text;
oFLOOR = FLOOR.Text;
oBLOCK_STORE = BLOCK_STORE.Text;
oPHONE = PHONE.Text;
oSTORE_TYPE = STORE_TYPE.SelectedItem.Value;
oBLOCK_NO = BLOCK_NO.Text;
oADDRESS = ADDRESS.Text;
oDATE_REG = ForNET.DateToDB(Reg_date.Text);
//---------------------------------------------------------------------//INSERT KE TABLE GNRL_REF_STORE dengan kondisi MALL
!= ROAD AREA
//----------------------------------------------------------------------string myQueryCity = "INSERT INTO GNRL_REF_STORE" +
"
(ID_EMP,ID_MALL,STORE_NAME,PROV_ID,CITY_ID,FLOOR,BLOCK_STORE,PHONE
,INPUT_BY,UPDATE_BY,COMP_ID," +
"STORE_TYPE,BLOCK_NO,ADDRESS,REGISTER_DATE)" +
" VALUES(" +
"'" + ID_EMP.SelectedItem.Value +
"'," +
"'" + ID_MALL.SelectedItem.Value
+ "'," +
"'" + oSTORE_NAME + "'," +
"'" + sPROV_ID + "'," +
"'" + sCITY_ID + "'," +
"'" + oFLOOR + "'," +
404
"'" + oBLOCK_STORE + "'," +
"'" + oPHONE + "'," +
"'" + Session["SESS_USER_ID"] +
"'," +
"'" + Session["SESS_USER_ID"] +
"'," +
"'" + Session["SESS_COMP_ID"] +
"'," +
"'" + oSTORE_TYPE + "'," +
"'" + oBLOCK_NO + "'," +
"'" + oADDRESS + "'," +
"" + oDATE_REG + "" +
")";
bool suksesInsertCity =
ConnOracle.ExecNonQueryConnOra(myQueryCity);
if (suksesInsertCity)
{
//ID_EMP.Text = "";
//STORE_NAME.Text = "";
//CITY_ID.Text = "";
//CITY_ID.Text = "";
//FLOOR.Text = "";
//BLOCK_STORE.Text = "";
//PHONE.Text = "";
//STORE_TYPE.SelectedItem.Value = "";
//ID_MALL.Text = "";
//combo_prov.Text = "";
//combo_city.Text = "";
//BLOCK_NO.Text = "";
//ADDRESS.Text = "";
//TextBox1.Text = "";
//TextBox2.Text = "";
//Reg_date.Text = "";
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "confirm('Insert Success, do you want continue to
Store Registration ?'); if(Ok){window.location.href =
'RegistrasiToko.aspx'} else{window.location.href =
'Default.aspx'};", true);
//ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Success.')\", 0);", true);
}
else
{
//ID_EMP.Text = "";
//STORE_NAME.Text = "";
//CITY_ID.Text = "";
//CITY_ID.Text = "";
//FLOOR.Text = "";
//BLOCK_STORE.Text = "";
//PHONE.Text = "";
//STORE_TYPE.SelectedItem.Value = "";
//ID_MALL.Text = "";
//combo_prov.Text = "";
//combo_city.Text = "";
405
//BLOCK_NO.Text = "";
//ADDRESS.Text = "";
//TextBox1.Text = "";
//TextBox2.Text = "";
//Reg_date.Text = "";
//ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed.')\", 0);", true);
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "alert('Insert Failed'); window.location.href =
'RegistrasiToko.aspx';", true);
}
}
}
//========== event Cancel
protected void ASPxButton3_Click(object sender, EventArgs e)
{
ClientScript.RegisterStartupScript(typeof(Page),
"MessagePopUp", "alert('Thankyou'); window.location.href =
'Default.aspx';", true);
}
}
RegistrasiTokoOwner.aspx
<%@ Page Language="C#" MasterPageFile="MasterPage.master"
AutoEventWireup="true" CodeFile="RegistrasiTokoOwner.aspx.cs"
Inherits="AppModules_RegToko" Title="Sales Management System"
EnableEventValidation="false" %>
<%@ Register Assembly="DevExpress.Xpo.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Xpo" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
406
<asp:Content ID="Content_Main" ContentPlaceHolderID="Content_Main"
Runat="Server">
<form id="form1">
<div style="text-align: left">
<!-- ======================== TABLE UTAMA
=========================== -->
<dx:ASPxRoundPanel id="ASPxRoundPanel1" runat="server"
BackColor="White" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
CssPostfix="Aqua" HeaderText="Store Registration"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
Width="200px">
<topedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpTopEdge.gif"></BackgroundImage>
</topedge>
<leftedge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpLeftEdge.gif"></BackgroundImage>
</leftedge>
<headercontent>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headercontent>
<contentpaddings padding="14px"></contentpaddings>
<rightedge>
<BackgroundImage Repeat="RepeatY" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpRightEdge.gif"></BackgroundImage
>
</rightedge>
<headerrightedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headerrightedge>
<border bordercolor="#AECAF0" borderstyle="Solid"
borderwidth="1px"></border>
<headerstyle backcolor="#E0EDFF">
<BorderBottom BorderWidth="1px" BorderStyle="Solid"
BorderColor="#AECAF0"></BorderBottom>
</headerstyle>
<headerleftedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpHeaderBackground.gif"></Backgrou
ndImage>
</headerleftedge>
<bottomedge>
<BackgroundImage Repeat="RepeatX" VerticalPosition="Bottom"
ImageUrl="~/App_Themes/Aqua/Web/rpBottomEdge.gif"></BackgroundImag
e>
</bottomedge>
<panelcollection>
<dx:PanelContent runat="server"><asp:Label runat="server"
Width="363px" ID="CaptionUtama"></asp:Label>
407
<BR /><TABLE width="100%"><TBODY><TR><TD
colSpan=6><asp:ScriptManager runat="server"
ID="ScriptManager1"></asp:ScriptManager>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top><asp:Label
runat="server" Width="150px" ID="Caption1"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel1"><ContentTemplate>
<dx:ASPxComboBox id="ID_EMP" runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
DataSourceID="Table_emp" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css" ShowShadow="False"
__designer:wfdid="w474" ValueType="System.String" ValueField="ID"
TextField="EMP_NAME" LoadingPanelImagePosition="Top"
EnableIncrementalFiltering="True"><Columns>
<dx:ListBoxColumn FieldName="EMP_NAME" Caption="Name"
Name="Name"></dx:ListBoxColumn>
<dx:ListBoxColumn FieldName="ID" Caption="ID" Visible="False"
Name="ID"></dx:ListBoxColumn>
<dx:ListBoxColumn FieldName="MOBILE_NO" Caption="Mobile
No"></dx:ListBoxColumn>
</Columns>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
</dx:ASPxComboBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator1" runat="server" Width="216px"
__designer:wfdid="w475" ErrorMessage="Owner Name can't empty"
ControlToValidate="ID_EMP"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 129px" vAlign=top><asp:Label
runat="server" Width="150px" ID="Caption7"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel7"><ContentTemplate>
<asp:TextBox id="ADDRESS" tabIndex=8 runat="server"
__designer:wfdid="w1" Enabled="False" ReadOnly="True"
TextMode="MultiLine"></asp:TextBox> 
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top><asp:Label
runat="server" Width="150px" ID="Caption2"></asp:Label>
408
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><SPAN style="FONT-SIZE: 10pt; COLOR:
#ff0033"><asp:UpdatePanel runat="server"
ID="UpdatePanel2"><ContentTemplate>
<asp:TextBox id="STORE_NAME" tabIndex=2 runat="server"
__designer:wfdid="w476"></asp:TextBox> <BR
/><asp:RequiredFieldValidator id="RequiredFieldValidator2"
runat="server" Width="215px" __designer:wfdid="w477"
ControlToValidate="STORE_NAME" ErrorMessage="Shop name can't
empty"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</SPAN></TD><TD style="WIDTH: 129px" vAlign=top><asp:Label
runat="server" Width="150px" ID="Caption8"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel9"><ContentTemplate>
<asp:TextBox id="FLOOR" tabIndex=9 runat="server" Width="47px"
__designer:wfdid="w2"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top><asp:Label
runat="server" Width="150px" ID="Caption3"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><SPAN style="FONT-SIZE: 10pt; COLOR:
#ff0033"><asp:UpdatePanel runat="server"
ID="UpdatePanel3"><ContentTemplate>
<asp:DropDownList id="STORE_TYPE" tabIndex=3 runat="server"
DataSourceID="Table_parameter_value" DataValueField="ID"
DataTextField="PARAMETER_VALUE"
__designer:wfdid="w479"></asp:DropDownList> <BR
/><asp:RequiredFieldValidator id="RequiredFieldValidator3"
runat="server" Width="213px" ControlToValidate="STORE_TYPE"
ErrorMessage="Type can't empty"
__designer:wfdid="w480"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
</SPAN></TD><TD style="WIDTH: 129px" vAlign=top><asp:Label
runat="server" Width="150px" ID="Caption9"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel10"><ContentTemplate>
<asp:TextBox id="BLOCK_STORE" tabIndex=10 runat="server"
Width="47px" __designer:wfdid="w3"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top><asp:Label
runat="server" Width="150px" ID="Caption4"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel4"><ContentTemplate>
<dx:ASPxComboBox id="ID_MALL" tabIndex=4 runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
DataSourceID="table_mall" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css" ShowShadow="False"
EnableIncrementalFiltering="True" LoadingPanelImagePosition="Top"
TextField="MALL_NAME" ValueField="ID" ValueType="System.String"
AutoPostBack="True" __designer:wfdid="w482"
409
OnSelectedIndexChanged="ID_MALL_SelectedIndexChanged1"
IncrementalFilteringDelay="10">
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxComboBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator4" runat="server" Width="212px"
ControlToValidate="ID_MALL" ErrorMessage="Mall can't empty"
__designer:wfdid="w483"></asp:RequiredFieldValidator>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress1"
AssociatedUpdatePanelID="UpdatePanel4"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress1" runat="server"
ImageUrl="~/images/wait.gif" Width="150px"
__designer:wfdid="w484"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD><TD style="WIDTH: 129px" vAlign=top><asp:Label runat="server"
Width="150px" ID="Caption10"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel8"><ContentTemplate>
<asp:TextBox id="BLOCK_NO" tabIndex=11 runat="server" Width="47px"
__designer:wfdid="w4"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top><asp:Label
runat="server" Width="150px" ID="Caption5"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel5"><ContentTemplate>
<asp:TextBox id="TextBox1" tabIndex=5 runat="server"
ReadOnly="True" Enabled="False"
__designer:wfdid="w486"></asp:TextBox> <dx:ASPxComboBox
id="combo_prov" tabIndex=5 runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
ShowShadow="False" LoadingPanelImagePosition="Top"
ValueType="System.String" AutoPostBack="True"
__designer:wfdid="w487"
OnSelectedIndexChanged="combo_prov_SelectedIndexChanged"
Visible="False">
410
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxComboBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator5" runat="server" Width="213px"
ControlToValidate="PROV_ID" ErrorMessage="Province can't empty"
__designer:wfdid="w488"></asp:RequiredFieldValidator> <asp:TextBox
id="PROV_ID" tabIndex=5 runat="server" Enabled="False"
__designer:wfdid="w489" Visible="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress runat="server" ID="UpdateProgress2"
AssociatedUpdatePanelID="UpdatePanel5"><ProgressTemplate>
<DIV class="progress"><asp:Image id="imgProgress2" runat="server"
ImageUrl="~/images/wait.gif" Width="150px"
__designer:wfdid="w490"></asp:Image><STRONG><SPAN style="COLOR:
#006600"></SPAN></STRONG> </DIV>
</ProgressTemplate>
</asp:UpdateProgress>
</TD><TD style="WIDTH: 129px" vAlign=top><asp:Label runat="server"
Width="150px" ID="Caption11"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel11"><ContentTemplate>
<asp:TextBox id="PHONE" tabIndex=12 runat="server"
__designer:wfdid="w5"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD style="WIDTH: 122px" vAlign=top><asp:Label
runat="server" Width="150px" ID="Caption6"></asp:Label>
</TD><TD style="WIDTH: 7px" vAlign=top>:</TD><TD style="WIDTH:
289px" vAlign=top><asp:UpdatePanel runat="server"
ID="UpdatePanel6"><ContentTemplate>
<asp:TextBox id="TextBox2" tabIndex=6 runat="server"
ReadOnly="True" Enabled="False"
__designer:wfdid="w492"></asp:TextBox> <dx:ASPxComboBox
id="combo_city" tabIndex=6 runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
ShowShadow="False" LoadingPanelImagePosition="Top"
ValueType="System.String" __designer:wfdid="w493" Visible="False">
<LoadingPanelImage
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanelImage>
<DropDownButton>
411
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
</dx:ASPxComboBox> <asp:RequiredFieldValidator
id="RequiredFieldValidator6" runat="server" Width="214px"
ControlToValidate="CITY_ID" ErrorMessage="City can't empty"
__designer:wfdid="w494"></asp:RequiredFieldValidator> <asp:TextBox
id="CITY_ID" tabIndex=6 runat="server" Enabled="False"
__designer:wfdid="w495" Visible="False"></asp:TextBox> 
</ContentTemplate>
</asp:UpdatePanel>
</TD><TD style="WIDTH: 129px" vAlign=top><asp:Label
runat="server" Width="150px" ID="Caption12"></asp:Label>
</TD><TD style="WIDTH: 6px" vAlign=top>:</TD><TD style="WIDTH:
671px" vAlign=top><dx:ASPxDateEdit runat="server"
SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css"
CssPostfix="Aqua" EditFormatString="dd/MM/yy" EditFormat="Custom"
ID="Reg_date" ShowShadow="False"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css" TabIndex="7">
<ValidationSettings>
<ErrorFrameStyle ImageSpacing="4px">
<ErrorTextPaddings PaddingLeft="4px"></ErrorTextPaddings>
</ErrorFrameStyle>
</ValidationSettings>
<CalendarProperties>
<FooterStyle Spacing="17px"></FooterStyle>
<HeaderStyle Spacing="1px"></HeaderStyle>
</CalendarProperties>
<DropDownButton>
<Image>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</Image>
</DropDownButton>
</dx:ASPxDateEdit>
</TD></TR><TR><TD style="HEIGHT: 30px; TEXT-ALIGN: left"
colSpan=7></TD></TR><TR><TD style="TEXT-ALIGN: left"
colSpan=7><asp:UpdatePanel runat="server"
ID="UpdatePanel13"><ContentTemplate>
<asp:Button id="BTN_SAVE" tabIndex=13 onclick="BTN_SAVE_Click"
runat="server" Width="60px" BackColor="LightBlue"
__designer:wfdid="w497" BorderStyle="Outset"
BorderColor="DarkGray" Text="Save"></asp:Button> <asp:Button
id="BTN_CANCEL" tabIndex=14 onclick="BTN_CANCEL_Click"
412
runat="server" BackColor="LightBlue" __designer:wfdid="w498"
BorderStyle="Outset" BorderColor="DarkGray" Text="Cancel"
CausesValidation="False"></asp:Button>
</ContentTemplate>
</asp:UpdatePanel>
</TD></TR><TR><TD colSpan=7>
<HR style="WIDTH: 101%" color=#006fae />
 </TD></TR><TR><TD colSpan=7><asp:UpdatePanel runat="server"
ID="UpdatePanel12"><ContentTemplate>
<dx:ASPxGridView id="ASPxGridView1" runat="server" Width="900px"
DataSourceID="SqlDataSource1" CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css"
__designer:wfdid="w499" AutoGenerateColumns="False"
KeyFieldName="ID" OnRowUpdating="ASPxGridView1_RowUpdating">
<Styles CssPostfix="Aqua"
CssFilePath="~/App_Themes/Aqua/{0}/styles.css">
<LoadingPanel ImageSpacing="8px"></LoadingPanel>
</Styles>
<SettingsPager PageSize="20" Position="Top"></SettingsPager>
<Columns>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="0"><DataItemTemplate>
<a href="EditRegistrasiToko.aspx?id_edit=<%#Eval
("ID")%>">Update</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataTextColumn VisibleIndex="1"
FieldName="ID"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="2" FieldName="STORE_CODE"
Caption="Store Code"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3" FieldName="STORE_NAME"
Caption="Store Name"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4"
FieldName="City"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="5"
FieldName="Province"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="6"
FieldName="Address"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="7"
FieldName="No"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="8"
FieldName="Block"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="9"
FieldName="Floor"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="10"
FieldName="Phone"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="11"
FieldName="STORE_TYPE" Caption="Store
Type"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="12"
FieldName="OWNER_NAME" Caption="Owner
Name"></dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn VisibleIndex="13"
FieldName="REGISTER_DATE" Caption="Register
Date"></dx:GridViewDataDateColumn>
</Columns>
<ImagesFilterControl>
413
<LoadingPanel
Url="~/App_Themes/Aqua/Editors/Loading.gif"></LoadingPanel>
</ImagesFilterControl>
<Images SpriteCssFilePath="~/App_Themes/Aqua/{0}/sprite.css">
<LoadingPanelOnStatusBar
Url="~/App_Themes/Aqua/GridView/gvLoadingOnStatusBar.gif"></Loadin
gPanelOnStatusBar>
<LoadingPanel
Url="~/App_Themes/Aqua/GridView/Loading.gif"></LoadingPanel>
</Images>
<SettingsLoadingPanel ImagePosition="Top"></SettingsLoadingPanel>
<Settings ShowGroupPanel="True" ShowVerticalScrollBar="True"
ShowFilterRow="True" ShowHorizontalScrollBar="True"></Settings>
<StylesEditors>
<CalendarHeader Spacing="1px"></CalendarHeader>
<ProgressBar Height="25px"></ProgressBar>
</StylesEditors>
<ImagesEditors>
<SpinEditLargeIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeIncImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeIncImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeIncrement>
<SpinEditLargeDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditLargeDecImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditLargeDecImagePressed_Aqua"><
/SpriteProperties>
</SpinEditLargeDecrement>
<SpinEditIncrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditIncrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditIncrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditIncrement>
<SpinEditDecrement>
<SpriteProperties
HottrackedCssClass="dxEditors_edtSpinEditDecrementImageHover_Aqua"
PressedCssClass="dxEditors_edtSpinEditDecrementImagePressed_Aqua">
</SpriteProperties>
</SpinEditDecrement>
<DropDownEditDropDown>
<SpriteProperties
HottrackedCssClass="dxEditors_edtDropDownHover_Aqua"
PressedCssClass="dxEditors_edtDropDownPressed_Aqua"></SpriteProper
ties>
</DropDownEditDropDown>
414
</ImagesEditors>
</dx:ASPxGridView>
</ContentTemplate>
</asp:UpdatePanel>
<!-- ============================================= DATA GRID
============================================================= -><!-- ============================================= AKHIR DATA
GRID =============================================================
--><asp:SqlDataSource runat="server" ID="Table_Store"
SelectCommand="SELECT * FROM "GNRL_REF_STORE""
OldValuesParameterFormatString="original_{0}"
ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM
"GNRL_REF_STORE" WHERE "ID" = :original_ID AND
(("STORE_CODE" = :original_STORE_CODE) OR
("STORE_CODE" IS NULL AND :original_STORE_CODE IS NULL))
AND (("ID_EMP" = :original_ID_EMP) OR
("ID_EMP" IS NULL AND :original_ID_EMP IS NULL)) AND
(("ID_MALL" = :original_ID_MALL) OR ("ID_MALL"
IS NULL AND :original_ID_MALL IS NULL)) AND
(("STORE_NAME" = :original_STORE_NAME) OR
("STORE_NAME" IS NULL AND :original_STORE_NAME IS NULL))
AND (("PROV_ID" = :original_PROV_ID) OR
("PROV_ID" IS NULL AND :original_PROV_ID IS NULL)) AND
(("CITY_ID" = :original_CITY_ID) OR ("CITY_ID"
IS NULL AND :original_CITY_ID IS NULL)) AND (("FLOOR" =
:original_FLOOR) OR ("FLOOR" IS NULL AND :original_FLOOR
IS NULL)) AND (("BLOCK_STORE" = :original_BLOCK_STORE)
OR ("BLOCK_STORE" IS NULL AND :original_BLOCK_STORE IS
NULL)) AND (("PHONE" = :original_PHONE) OR
("PHONE" IS NULL AND :original_PHONE IS NULL)) AND
(("INPUT_DATE" = :original_INPUT_DATE) OR
("INPUT_DATE" IS NULL AND :original_INPUT_DATE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
(("UPDATE_DATE" = :original_UPDATE_DATE) OR
("UPDATE_DATE" IS NULL AND :original_UPDATE_DATE IS
NULL)) AND (("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))
AND (("COMP_ID" = :original_COMP_ID) OR
("COMP_ID" IS NULL AND :original_COMP_ID IS NULL)) AND
(("STORE_TYPE" = :original_STORE_TYPE) OR
("STORE_TYPE" IS NULL AND :original_STORE_TYPE IS NULL))
AND (("STORE_SEGMENT" = :original_STORE_SEGMENT) OR
("STORE_SEGMENT" IS NULL AND :original_STORE_SEGMENT IS
NULL)) AND (("BLOCK_NO" = :original_BLOCK_NO) OR
("BLOCK_NO" IS NULL AND :original_BLOCK_NO IS NULL)) AND
(("ADDRESS" = :original_ADDRESS) OR ("ADDRESS"
IS NULL AND :original_ADDRESS IS NULL))" InsertCommand="INSERT
INTO "GNRL_REF_STORE" ("ID",
"STORE_CODE", "ID_EMP", "ID_MALL",
"STORE_NAME", "PROV_ID", "CITY_ID",
"FLOOR", "BLOCK_STORE", "PHONE",
"INPUT_DATE", "INPUT_BY",
"UPDATE_DATE", "UPDATE_BY",
"COMP_ID", "STORE_TYPE",
"STORE_SEGMENT", "BLOCK_NO",
"ADDRESS") VALUES (:ID, :STORE_CODE, :ID_EMP, :ID_MALL,
:STORE_NAME, :PROV_ID, :CITY_ID, :FLOOR, :BLOCK_STORE, :PHONE,
:INPUT_DATE, :INPUT_BY, :UPDATE_DATE, :UPDATE_BY, :COMP_ID,
415
:STORE_TYPE, :STORE_SEGMENT, :BLOCK_NO, :ADDRESS)"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>" UpdateCommand="UPDATE "GNRL_REF_STORE" SET
"STORE_CODE" = :STORE_CODE, "ID_EMP" =
:ID_EMP, "ID_MALL" = :ID_MALL, "STORE_NAME" =
:STORE_NAME, "PROV_ID" = :PROV_ID, "CITY_ID" =
:CITY_ID, "FLOOR" = :FLOOR, "BLOCK_STORE" =
:BLOCK_STORE, "PHONE" = :PHONE, "INPUT_DATE" =
:INPUT_DATE, "INPUT_BY" = :INPUT_BY,
"UPDATE_DATE" = :UPDATE_DATE, "UPDATE_BY" =
:UPDATE_BY, "COMP_ID" = :COMP_ID, "STORE_TYPE"
= :STORE_TYPE, "STORE_SEGMENT" = :STORE_SEGMENT,
"BLOCK_NO" = :BLOCK_NO, "ADDRESS" = :ADDRESS
WHERE "ID" = :original_ID AND (("STORE_CODE" =
:original_STORE_CODE) OR ("STORE_CODE" IS NULL AND
:original_STORE_CODE IS NULL)) AND (("ID_EMP" =
:original_ID_EMP) OR ("ID_EMP" IS NULL AND
:original_ID_EMP IS NULL)) AND (("ID_MALL" =
:original_ID_MALL) OR ("ID_MALL" IS NULL AND
:original_ID_MALL IS NULL)) AND (("STORE_NAME" =
:original_STORE_NAME) OR ("STORE_NAME" IS NULL AND
:original_STORE_NAME IS NULL)) AND (("PROV_ID" =
:original_PROV_ID) OR ("PROV_ID" IS NULL AND
:original_PROV_ID IS NULL)) AND (("CITY_ID" =
:original_CITY_ID) OR ("CITY_ID" IS NULL AND
:original_CITY_ID IS NULL)) AND (("FLOOR" =
:original_FLOOR) OR ("FLOOR" IS NULL AND :original_FLOOR
IS NULL)) AND (("BLOCK_STORE" = :original_BLOCK_STORE)
OR ("BLOCK_STORE" IS NULL AND :original_BLOCK_STORE IS
NULL)) AND (("PHONE" = :original_PHONE) OR
("PHONE" IS NULL AND :original_PHONE IS NULL)) AND
(("INPUT_DATE" = :original_INPUT_DATE) OR
("INPUT_DATE" IS NULL AND :original_INPUT_DATE IS NULL))
AND (("INPUT_BY" = :original_INPUT_BY) OR
("INPUT_BY" IS NULL AND :original_INPUT_BY IS NULL)) AND
(("UPDATE_DATE" = :original_UPDATE_DATE) OR
("UPDATE_DATE" IS NULL AND :original_UPDATE_DATE IS
NULL)) AND (("UPDATE_BY" = :original_UPDATE_BY) OR
("UPDATE_BY" IS NULL AND :original_UPDATE_BY IS NULL))
AND (("COMP_ID" = :original_COMP_ID) OR
("COMP_ID" IS NULL AND :original_COMP_ID IS NULL)) AND
(("STORE_TYPE" = :original_STORE_TYPE) OR
("STORE_TYPE" IS NULL AND :original_STORE_TYPE IS NULL))
AND (("STORE_SEGMENT" = :original_STORE_SEGMENT) OR
("STORE_SEGMENT" IS NULL AND :original_STORE_SEGMENT IS
NULL)) AND (("BLOCK_NO" = :original_BLOCK_NO) OR
("BLOCK_NO" IS NULL AND :original_BLOCK_NO IS NULL)) AND
(("ADDRESS" = :original_ADDRESS) OR ("ADDRESS"
IS NULL AND :original_ADDRESS IS NULL))"><InsertParameters>
<asp:Parameter Type="Decimal" Name="ID"></asp:Parameter>
<asp:Parameter Type="String" Name="STORE_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_EMP"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_MALL"></asp:Parameter>
<asp:Parameter Type="String" Name="STORE_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="CITY_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="FLOOR"></asp:Parameter>
<asp:Parameter Type="String" Name="BLOCK_STORE"></asp:Parameter>
416
<asp:Parameter Type="String" Name="PHONE"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="STORE_TYPE"></asp:Parameter>
<asp:Parameter Type="String" Name="BLOCK_NO"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"></asp:Parameter>
</InsertParameters>
<UpdateParameters>
<asp:Parameter Type="String" Name="STORE_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_EMP"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="ID_MALL"></asp:Parameter>
<asp:Parameter Type="String" Name="STORE_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="CITY_ID"></asp:Parameter>
<asp:Parameter Type="String" Name="FLOOR"></asp:Parameter>
<asp:Parameter Type="String" Name="BLOCK_STORE"></asp:Parameter>
<asp:Parameter Type="String" Name="PHONE"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime" Name="UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="STORE_TYPE"></asp:Parameter>
<asp:Parameter Type="String" Name="BLOCK_NO"></asp:Parameter>
<asp:Parameter Type="String" Name="ADDRESS"></asp:Parameter>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_STORE_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_EMP"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_MALL"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_STORE_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_CITY_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_FLOOR"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_BLOCK_STORE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_PHONE"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_STORE_TYPE"></asp:Parameter>
417
<asp:Parameter Type="String"
Name="original_BLOCK_NO"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ADDRESS"></asp:Parameter>
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Type="Decimal" Name="original_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_STORE_CODE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_EMP"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_ID_MALL"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_STORE_NAME"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_PROV_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_CITY_ID"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_FLOOR"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_BLOCK_STORE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_PHONE"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_INPUT_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_INPUT_BY"></asp:Parameter>
<asp:Parameter Type="DateTime"
Name="original_UPDATE_DATE"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_UPDATE_BY"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_COMP_ID"></asp:Parameter>
<asp:Parameter Type="Decimal"
Name="original_STORE_TYPE"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_BLOCK_NO"></asp:Parameter>
<asp:Parameter Type="String"
Name="original_ADDRESS"></asp:Parameter>
</DeleteParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_parameter_value"
SelectCommand="SELECT * FROM "GNRL_PARAMETER_VALUE"
WHERE ("PAR_ID" = :PAR_ID)" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"><SelectParameters>
<asp:Parameter Type="Decimal" DefaultValue="6"
Name="PAR_ID"></asp:Parameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="Table_emp"
SelectCommand="SELECT "ID", "EMP_NAME",
"EMP_CODE", "ID_USER", "SEX",
"MOBILE_NO", "ADDRESS", "COMP_ID"
FROM "EMP_STORE" ORDER BY "EMP_NAME" ASC"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
418
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="table_mall"
SelectCommand="SELECT "ID", "PROV_ID",
"MALL_NAME", "ADDRESS", "CITY_ID",
"TELP_NO", "INACTIVE" FROM
"GNRL_REF_MALL" WHERE ("INACTIVE" = :INACTIVE)
ORDER BY "MALL_NAME"" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"><SelectParameters>
<asp:Parameter Type="String" DefaultValue="N"
Name="INACTIVE"></asp:Parameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="SqlDataSource1"
SelectCommand="SELECT "ID", "Store Code" AS
Store_Code, "Store name" AS Store_name,
"City", "Province", "Address",
"No", "Block", "Floor",
"Phone", "Store Type" AS Store_Type,
"Owner Name" AS Owner_Name, "Register Date" AS
Register_Date FROM "OWNER_STORE_VIEW" ORDER BY
"ID" DESC" ConnectionString="<%$
ConnectionStrings:ConnectionString %>" ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="table_prov"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="table_city"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
  
</TD></TR></TBODY></TABLE></dx:PanelContent>
</panelcollection>
<noheadertopedge backcolor="White">
<BackgroundImage Repeat="RepeatX" VerticalPosition="Top"
ImageUrl="~/App_Themes/Aqua/Web/rpNoHeaderTopEdge.gif"></Backgroun
dImage>
</noheadertopedge>
</dx:ASPxRoundPanel><br />
</div>
</form>
 
</asp:Content>
RegistrasiTokoOwner.aspx.cs
using
using
using
using
System;
System.Data;
System.Configuration;
System.Collections;
419
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CJM.Database.Oracle;
using System.Data.OracleClient;
using CJM.Reference;
using CJM.Project.LGE;
using System.Drawing;
using DevExpress.Web.ASPxEditors;
//using DevExpress.Web.ASPxEditors;
public partial class AppModules_RegToko : System.Web.UI.Page
{
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = buzdomain.com)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =blitz.buzdomain.com))); User
Id=buzapps; password=qwerty007;";
//string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = blitz.co.id)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =buzdev))); User Id=buzapps;
password=qwerty007;";
string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =xronosit))); User
Id=buzapps; password=qwerty007;";
protected void Page_Load(object sender, EventArgs e)
{
if (Session["SESS_USER_ID"] == null)
{
Response.Redirect("../LogOut.aspx");
}
//============================= cek caption
=================
if (Session["SESS_LANG"] == "english")
{
Caption1.Text = "Owner";
Caption2.Text = "Store Name";
Caption3.Text = "Type";
Caption4.Text = "Mall";
Caption5.Text = "Province";
Caption6.Text = "City";
Caption7.Text = "Address";
Caption8.Text = "Floor";
Caption9.Text = "Block";
Caption10.Text = "No";
Caption11.Text = "Phone";
CaptionUtama.Text = "Store Registration";
Caption12.Text = "Register Date";
}
if (Session["SESS_LANG"] == "indonesia")
{
Caption1.Text = "Nama Pemilik";
420
Caption2.Text = "Nama Toko";
Caption3.Text = "Tipe";
Caption4.Text = "Mall";
Caption5.Text = "Propinsi";
Caption6.Text = "Kota";
Caption7.Text = "Alamat";
Caption8.Text = "Lantai";
Caption9.Text = "Block";
Caption10.Text = "No";
Caption11.Text = "Telephon";
CaptionUtama.Text = "Store Registration";
Caption12.Text = "Tgl. Registrasi";
}
}
protected void BTN_SAVE_Click(object sender, EventArgs e)
{
if (ID_MALL.SelectedItem.Text == "ROAD AREA")
{
string sPROV_ID
=
combo_prov.SelectedItem.Value.ToString();
string sCITY_ID
=
combo_city.SelectedItem.Value.ToString();
string oSTORE_NAME = STORE_NAME.Text;
string oFLOOR
= FLOOR.Text;
string oBLOCK_STORE = BLOCK_STORE.Text;
string oPHONE
= PHONE.Text;
string oSTORE_TYPE = STORE_TYPE.SelectedItem.Value;
string oBLOCK_NO
= BLOCK_NO.Text;
string oADDRESS
= ADDRESS.Text;
string oDATE_REG = ForNET.DateToDB(Reg_date.Text);
//---------------------------------------------------------------------//INSERT KE TABLE GNRL_REF_STORE dengan
kondisi MALL == ROAD AREA
//----------------------------------------------------------------------string myQueryCity = "INSERT INTO GNRL_REF_STORE"
+
"
(ID_EMP,ID_MALL,STORE_NAME,PROV_ID,CITY_ID,FLOOR,BLOCK_STORE,PHONE
,INPUT_BY,UPDATE_BY,COMP_ID,"+
"STORE_TYPE,BLOCK_NO,ADDRESS,REGISTER_DATE)" +
" VALUES(" +
"'" +
ID_EMP.SelectedItem.Value + "'," +
"'" +
ID_MALL.SelectedItem.Value + "'," +
"'" + oSTORE_NAME + "'," +
"'" + sPROV_ID + "'," +
"'" + sCITY_ID + "'," +
"'" + oFLOOR + "'," +
"'" + oBLOCK_STORE + "'," +
"'" + oPHONE + "'," +
421
"'" + Session["SESS_USER_ID"]
+ "'," +
"'" + Session["SESS_USER_ID"]
+ "'," +
"'" + Session["SESS_COMP_ID"]
+ "'," +
"'" + oSTORE_TYPE + "'," +
"'" + oBLOCK_NO + "'," +
"'" + oADDRESS + "'," +
"" + oDATE_REG + "" +
")";
bool suksesInsertCity =
ConnOracle.ExecNonQueryConnOra(myQueryCity);
if (suksesInsertCity)
{
STORE_NAME.Text = "";
FLOOR.Text = "";
BLOCK_STORE.Text = "";
PHONE.Text = "";
STORE_TYPE.SelectedItem.Text = "";
BLOCK_NO.Text = "";
ADDRESS.Text = "";
combo_city.SelectedItem.Text = "";
combo_prov.SelectedItem.Text = "";
Reg_date.Text = "";
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Success.')\", 0);", true);
}
if (combo_prov.Enabled == false)
{
STORE_NAME.Text = "";
FLOOR.Text = "";
BLOCK_STORE.Text = "";
PHONE.Text = "";
STORE_TYPE.SelectedItem.Text = "";
BLOCK_NO.Text = "";
ADDRESS.Text = "";
combo_city.SelectedItem.Text = "";
combo_prov.SelectedItem.Text = "";
Reg_date.Text = "";
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed.')\", 0);", true);
}
}
else
{
string sPROV_ID = PROV_ID.Text;
string sCITY_ID = CITY_ID.Text;
string oSTORE_NAME = STORE_NAME.Text;
string oFLOOR = FLOOR.Text;
string oBLOCK_STORE = BLOCK_STORE.Text;
422
string
string
string
string
string
oPHONE = PHONE.Text;
oSTORE_TYPE = STORE_TYPE.SelectedItem.Value;
oBLOCK_NO = BLOCK_NO.Text;
oADDRESS = ADDRESS.Text;
oDATE_REG = ForNET.DateToDB(Reg_date.Text);
//---------------------------------------------------------------------//INSERT KE TABLE GNRL_REF_STORE dengan
kondisi MALL != ROAD AREA
//----------------------------------------------------------------------string myQueryCity = "INSERT INTO
GNRL_REF_STORE" +
"
(ID_EMP,ID_MALL,STORE_NAME,PROV_ID,CITY_ID,FLOOR,BLOCK_STORE,PHONE
,INPUT_BY,UPDATE_BY,COMP_ID," +
"STORE_TYPE,BLOCK_NO,ADDRESS,REGISTER_DATE)" +
" VALUES(" +
"'" +
ID_EMP.SelectedItem.Value + "'," +
"'" +
ID_MALL.SelectedItem.Value + "'," +
"'" + oSTORE_NAME +
"'," +
"'" + sPROV_ID + "',"
+
"'" + sCITY_ID + "',"
+
"'" + oFLOOR + "'," +
"'" + oBLOCK_STORE +
"'," +
"'" + oPHONE + "'," +
"'" +
Session["SESS_USER_ID"] + "'," +
"'" +
Session["SESS_USER_ID"] + "'," +
"'" +
Session["SESS_COMP_ID"] + "'," +
"'" + oSTORE_TYPE +
"'," +
"'" + oBLOCK_NO +
"'," +
"'" + oADDRESS + "',"
+
"" + oDATE_REG + "" +
")";
bool suksesInsertCity =
ConnOracle.ExecNonQueryConnOra(myQueryCity);
if (suksesInsertCity)
{
ID_EMP.Text = "";
STORE_NAME.Text = "";
CITY_ID.Text = "";
CITY_ID.Text = "";
FLOOR.Text = "";
423
BLOCK_STORE.Text = "";
PHONE.Text = "";
STORE_TYPE.SelectedItem.Value = "";
ID_MALL.Text = "";
combo_prov.Text = "";
combo_city.Text = "";
BLOCK_NO.Text = "";
ADDRESS.Text = "";
TextBox1.Text = "";
TextBox2.Text = "";
Reg_date.Text = "";
ScriptManager.RegisterClientScriptBlock(this, typeof(Page),
"validationAlert", "window.setTimeout(\"alert('Insert
Success.')\", 0);", true);
}
else
{
ID_EMP.Text = "";
STORE_NAME.Text = "";
CITY_ID.Text = "";
CITY_ID.Text = "";
FLOOR.Text = "";
BLOCK_STORE.Text = "";
PHONE.Text = "";
STORE_TYPE.SelectedItem.Value = "";
ID_MALL.Text = "";
combo_prov.Text = "";
combo_city.Text = "";
BLOCK_NO.Text = "";
ADDRESS.Text = "";
TextBox1.Text = "";
TextBox2.Text = "";
Reg_date.Text = "";
ScriptManager.RegisterClientScriptBlock(this, typeof(Page),
"validationAlert", "window.setTimeout(\"alert('Insert Failed.')\",
0);", true);
}
}
}
protected void BTN_CANCEL_Click(object sender, EventArgs e)
{
Response.Redirect("Default.aspx");
}
protected void ID_MALL_SelectedIndexChanged1(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string xID_MALL = ID_MALL.SelectedItem.Value.ToString();
//Response.Redirect("RegistrasiToko.aspx?mall="
+xID_MALL);
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
424
try
{
conn.Open();
string query = " select a.MALL_NAME, a.PROV_ID,
a.CITY_ID, a.ADDRESS, b.PROV_NAME, c.CITY_NAME" +
" from GNRL_REF_MALL a,
GNRL_REF_PROVINCE b, GNRL_REF_CITY c" +
" where " +
"a.ID='" + xID_MALL + "' and a.PROV_ID
= b.ID and a.CITY_ID = c.ID";
OracleCommand cmd = new OracleCommand(query, conn);
OracleDataReader dd = cmd.ExecuteReader();
if (dd.HasRows == false)
{
throw new Exception();
}
if (dd.Read())
{
if (dd["MALL_NAME"].ToString() != "ROAD AREA")
{
PROV_ID.Enabled = true;
CITY_ID.Enabled = true;
TextBox1.Enabled = true;
TextBox2.Enabled = true;
ADDRESS.Enabled = true;
TextBox1.Enabled
TextBox2.Enabled
TextBox1.Visible
TextBox2.Visible
=
=
=
=
combo_city.Visible
combo_city.Enabled
combo_prov.Visible
combo_prov.Enabled
true;
true;
true;
true;
=
=
=
=
false;
false;
false;
false;
RequiredFieldValidator5.Enabled = true;
RequiredFieldValidator6.Enabled = true;
PROV_ID.Text = dd["PROV_ID"].ToString();
CITY_ID.Text = dd["CITY_ID"].ToString();
TextBox1.Text = dd["PROV_NAME"].ToString();
TextBox2.Text = dd["CITY_NAME"].ToString();
ADDRESS.Text = dd["ADDRESS"].ToString();
}
if (dd["MALL_NAME"].ToString() == "ROAD AREA")
{
PROV_ID.Enabled = false;
CITY_ID.Enabled = false;
PROV_ID.Visible = false;
CITY_ID.Visible = false;
ADDRESS.Enabled = true;
ADDRESS.ReadOnly = false;
425
TextBox1.Enabled
TextBox2.Enabled
TextBox1.Visible
TextBox2.Visible
=
=
=
=
combo_city.Visible
combo_city.Enabled
combo_prov.Visible
combo_prov.Enabled
false;
false;
false;
false;
=
=
=
=
true;
true;
true;
true;
RequiredFieldValidator5.Enabled = false;
RequiredFieldValidator6.Enabled = false;
table_prov.SelectCommand = "SELECT ID,
PROV_NAME FROM gnrl_ref_province order by PROV_NAME ASC";
combo_prov.DataSource = table_prov;
combo_prov.TextField = "PROV_NAME";
combo_prov.ValueField = "ID";
combo_prov.DataBind();
combo_prov.Items.Insert(0, new ListEditItem("- chose --", " "));
}
dd.Dispose();
cmd.Dispose();
}
}
catch (Exception)
{
}
finally
{
conn.Dispose();
}
}
protected void combo_prov_SelectedIndexChanged(object sender,
EventArgs e)
{
System.Threading.Thread.Sleep(1000);
string comb_prov =
combo_prov.SelectedItem.Value.ToString();
table_city.SelectCommand = "SELECT ID, CITY_NAME FROM
gnrl_ref_city WHERE prov_id = " + comb_prov + " ORDER BY CITY_NAME
ASC";
combo_city.DataSource = table_city;
combo_city.TextField = "CITY_NAME";
combo_city.ValueField = "ID";
combo_city.DataBind();
combo_city.Items.Insert(0, new ListEditItem("-- chose --",
" "));
}
426
protected void ASPxGridView1_RowUpdating(object sender,
DevExpress.Web.Data.ASPxDataUpdatingEventArgs e)
{
e.Cancel = true;
Response.Redirect("EditRegistrasiToko.aspx?id_edit=" +
e.Keys);
}
}
RegistrasiFrontliner.aspx
<%--<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="RegistrasiFrontliner.aspx.cs"
Inherits="AppModules_RegistrasiFrontliner" %>
--%>
<%@ Page EnableEventValidation ="false" Language="C#"
MasterPageFile="MasterPage.master" AutoEventWireup="true"
CodeFile="RegistrasiFrontliner.aspx.cs"
Inherits="AppModules_RegistrasiFrontliner" Title="Sales Management
System" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v9.3, Version=9.3.3.0,
Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.3,
Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<asp:Content ID="Content_Main"
ContentPlaceHolderID="Content_Main" Runat="Server">
<asp:SqlDataSource ID="sdsPropinsi" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource ID="sdsKota" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
427
<asp:SqlDataSource ID="sdsMall" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<asp:SqlDataSource ID="sdsToko" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$
ConnectionStrings:ConnectionString.ProviderName
%>"></asp:SqlDataSource>
<form id="form1"
style="width: 871px">
<asp:ScriptManager ID="ScriptManager1"
runat="server">
</asp:ScriptManager>
<dx:ASPxRoundPanel ID="ASPxRoundPanel1"
runat="server" Width="900px" BackColor="#EBF2F4"
CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass"
HeaderText="Registration Frontliner"
SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css">
<PanelCollection>
<dx:PanelContent runat="server">
<table cellspacing=5 width="860">
<tr>
<td style="width: 208px" align="right"
valign="top">NO. HP:</td>
<td style="width: 335px">
<asp:UpdatePanel ID="UpdatePanel1"
runat="server">
<ContentTemplate>
<asp:TextBox id="noHP" runat="server" Width="152px"
__designer:wfdid="w106" CssClass="inputText"></asp:TextBox><A
href="javascript:NewCal('txtTglLahir','ddmmyyyy')"> <asp:Button
style="POSITION: relative" id="cmdNoHP" onclick="cmdNoHP_Click"
runat="server" Width="100px" __designer:wfdid="w107" Text="Cek No
HP"></asp:Button> </A>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td style="width: 208px" align="right"
valign="top">Nama Lengkap:</td>
<td style="width: 335px">
<asp:UpdatePanel
ID="UpdatePanelNamaLengkap" runat="server">
<ContentTemplate>
428
<asp:TextBox id="namaLengkap" runat="server"
__designer:wfdid="w109" CssClass="inputText"
Enabled="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td style="width: 208px" align="right"
valign="top">Jenis Kelamin:</td>
<td style="width: 335px">
<asp:UpdatePanel
ID="UpdatePanelJenkel" runat="server">
<ContentTemplate>
<asp:DropDownList id="ddlJenisKelamin" runat="server"
Width="208px" __designer:wfdid="w111" CssClass="inputText"
Enabled="False" AppendDataBoundItems="True">
<asp:ListItem Value="-PILIH--">--PILIH--</asp:ListItem>
<asp:ListItem
Value="L">LAKI-LAKI</asp:ListItem>
<asp:ListItem
Value="P">PEREMPUAN</asp:ListItem>
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td style="width: 208px; height:
92px;" align="right" valign="top">Tanggal Lahir:</td>
<td style="width: 335px; height:
92px;">
<asp:UpdatePanel
ID="UpdatePanelTglLahir" runat="server">
<ContentTemplate>
<dx:ASPxDateEdit id="txtTglLahir" runat="server"
CssPostfix="Glass" CssFilePath="~/App_Themes/Glass/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css"
__designer:wfdid="w113" Enabled="False">
<ButtonStyle Width="13px">
</ButtonStyle>
<ValidationSettings>
<ErrorFrameStyle
ImageSpacing="4px">
<ErrorTextPaddings
PaddingLeft="4px" />
</ErrorFrameStyle>
</ValidationSettings>
<CalendarProperties>
<FooterStyle
Spacing="4px" />
<HeaderStyle
Spacing="1px" />
429
</CalendarProperties>
</dx:ASPxDateEdit>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td style="width: 5px; height: 92px">
</td>
</tr>
<tr>
<td style="width: 208px" align="right"
valign="top">Alamat:</td>
<td style="width: 335px">
<asp:UpdatePanel
ID="UpdatePanelAlamatKaryawan" runat="server">
<ContentTemplate>
<asp:TextBox id="txtAlamatOwner" runat="server" Width="412px"
Height="50px" __designer:wfdid="w115" CssClass="inputText"
Enabled="False" Rows="2" TextMode="MultiLine"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel>
</td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td align="right" style="width: 208px; height: 39px"
valign="middle">
<strong><span style="font-size: 14pt; color:
steelblue">Store Information</span></strong></td>
<td style="width: 335px; height: 39px">
</td>
<td style="height: 39px; width: 5px;">
</td>
</tr>
<tr>
<td align="right" style="width: 208px" valign="top">
Propinsi:</td>
<td style="width: 335px">
<asp:UpdatePanel
ID="UpdatePanelProvince" runat="server">
<ContentTemplate>
<asp:DropDownList id="ddlPropinsi" runat="server" Width="208px"
__designer:wfdid="w142" Enabled="False" AutoPostBack="True"
OnSelectedIndexChanged="ddlPropinsi_SelectedIndexChanged">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel></td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td align="right" style="width: 208px" valign="top">
Kota:</td>
<td style="width: 335px">
<asp:UpdatePanel
ID="UpdatePanelCity" runat="server">
<ContentTemplate>
430
<asp:DropDownList id="ddlKota" runat="server" Width="208px"
__designer:wfdid="w143" Enabled="False" AutoPostBack="True"
OnSelectedIndexChanged="ddlKota_SelectedIndexChanged">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel></td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td align="right" style="width: 208px" valign="top">
Mall:</td>
<td style="width: 335px">
<asp:UpdatePanel
ID="UpdatePanelMall" runat="server">
<ContentTemplate>
<asp:DropDownList id="ddlMall" runat="server" Width="208px"
__designer:wfdid="w144" Enabled="False" AutoPostBack="True"
OnSelectedIndexChanged="ddlMall_SelectedIndexChanged"></asp:DropDo
wnList>
</ContentTemplate>
</asp:UpdatePanel></td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td align="right" style="width: 208px" valign="top">
Nama Toko/Dealer:</td>
<td style="width: 335px">
<asp:UpdatePanel
ID="UpdatePanelToko" runat="server">
<ContentTemplate>
<asp:DropDownList id="ddlToko" runat="server" Width="208px"
__designer:wfdid="w145" Enabled="False" AutoPostBack="True"
OnSelectedIndexChanged="ddlToko_SelectedIndexChanged"></asp:DropDo
wnList> <asp:Button style="POSITION: relative"
id="btnCancelInformasiToko" onclick="btnCancelInformasiToko_Click"
runat="server" Width="140px" __designer:wfdid="w146" Text="Cancel
Informasi Toko" Enabled="False"></asp:Button>
</ContentTemplate>
</asp:UpdatePanel></td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td align="right" style="width: 208px" valign="top">
Alamat:</td>
<td style="width: 335px">
<asp:UpdatePanel
ID="UpdatePanelAlamatToko" runat="server">
<ContentTemplate>
<asp:TextBox id="txtAlamatToko" runat="server" Width="412px"
Height="50px" __designer:wfdid="w147" CssClass="inputText"
Enabled="False" Rows="2" TextMode="MultiLine"></asp:TextBox> LT:
<asp:TextBox id="lt" runat="server" Width="32px"
__designer:wfdid="w148" CssClass="inputText"
Enabled="False"></asp:TextBox> Blok: <asp:TextBox id="blok"
runat="server" Width="32px" __designer:wfdid="w149"
CssClass="inputText" Enabled="False"></asp:TextBox> No:
431
<asp:TextBox id="no" runat="server" Width="45px"
__designer:wfdid="w150" CssClass="inputText"
Enabled="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel></td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td align="right" style="width: 208px" valign="top">
Nama Pemilik Toko/Dealer:</td>
<td style="width: 335px">
<asp:UpdatePanel
ID="UpdatePanelNamaPemilikToko" runat="server">
<ContentTemplate>
<asp:TextBox id="txtNamaOwner" runat="server"
__designer:wfdid="w151" CssClass="inputText"
Enabled="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel></td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td align="right" style="width: 208px; height: 16px"
valign="top">
Nomor HP Pemilik Toko:</td>
<td style="width: 335px; height: 16px">
<asp:UpdatePanel
ID="UpdatePanelHPPemilikToko" runat="server">
<ContentTemplate>
<asp:TextBox id="txtNoHPOwner" runat="server"
__designer:wfdid="w152" CssClass="inputText"
Enabled="False"></asp:TextBox>
</ContentTemplate>
</asp:UpdatePanel></td>
<td style="height: 16px; width: 5px;">
</td>
</tr>
<tr>
<td align="right" style="width: 208px" valign="top">
Tanggal Register:</td>
<td style="width: 335px">
<asp:UpdatePanel
ID="UpdatePanelTglRegister" runat="server">
<ContentTemplate>
<dx:ASPxDateEdit id="tglTerima" runat="server" CssPostfix="Glass"
CssFilePath="~/App_Themes/Glass/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Glass/{0}/sprite.css"
__designer:wfdid="w153" Enabled="False">
<ButtonStyle Width="13px">
</ButtonStyle>
<ValidationSettings>
<ErrorFrameStyle
ImageSpacing="4px">
<ErrorTextPaddings
PaddingLeft="4px" />
432
</ErrorFrameStyle>
</ValidationSettings>
<CalendarProperties>
<FooterStyle
Spacing="4px" />
<HeaderStyle
Spacing="1px" />
</CalendarProperties>
</dx:ASPxDateEdit>
</ContentTemplate>
<td style="width:
</td>
</tr>
<tr>
<td style="width:
</td>
<td style="width:
</td>
<td style="width:
</td>
</tr>
<tr>
<td style="width:
</td>
<td style="width:
</asp:UpdatePanel></td>
5px">
208px">
335px">
5px">
208px">
335px">
<asp:UpdatePanel ID="UpdatePanel2"
runat="server">
<ContentTemplate>
<asp:Button id="btnSave" onclick="btnSave_Click" runat="server"
Width="100px" __designer:wfdid="w156" Text="Save"
Enabled="False"></asp:Button> <asp:Button id="btnCancel"
onclick="btnCancel_Click" runat="server" Width="100px"
__designer:wfdid="w157" Text="Cancel"
Enabled="False"></asp:Button>
</ContentTemplate>
</asp:UpdatePanel></td>
<td style="width: 5px">
</td>
</tr>
<tr>
<td colspan="3">
<hr color="#006fae" style="width: 101%" />
 </td>
</tr>
<tr>
<td colspan="3">
<asp:UpdatePanel ID="UpdatePanel3"
runat="server">
<ContentTemplate>
<dx:ASPxGridView id="ASPxGridView1" runat="server" Width="860px"
__designer:wfdid="w158" Visible="False"
OnRowCommand="ASPxGridView1_RowCommand"
OnStartRowEditing="ASPxGridView1_StartRowEditing"
KeyFieldName="ID" AutoGenerateColumns="False">
<SettingsPager Visible="False"></SettingsPager>
<Columns>
<dx:GridViewCommandColumn VisibleIndex="0">
433
<ClearFilterButton Visible="True"></ClearFilterButton>
</dx:GridViewCommandColumn>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="1"><DataItemTemplate>
<a href="EditForm.aspx?KeyValue=<%# Eval("ID") + ".a9fopvovia3bt"
%>" >Edit</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataHyperLinkColumn
VisibleIndex="2"><DataItemTemplate>
<a href="EditForm.aspx?KeyDelete=<%# Eval("ID") + ".a9fopvovia3bt"
%>" >Delete</a>
</DataItemTemplate>
</dx:GridViewDataHyperLinkColumn>
<dx:GridViewDataTextColumn Visible="False" ReadOnly="True"
VisibleIndex="3" FieldName="ID"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="3" FieldName="EMP_NAME"
Caption="NAMA FRONTLINER"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="4" FieldName="MOBILE_NO"
Caption="NO. HP FRONTLINER"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="5" FieldName="SEX"
Caption="JENIS KELAMIN"></dx:GridViewDataTextColumn>
<dx:GridViewDataDateColumn VisibleIndex="6" FieldName="DATE_BIRTH"
Caption="TANGGAL LAHIR"></dx:GridViewDataDateColumn>
<dx:GridViewDataTextColumn VisibleIndex="7" FieldName="ADDRESS"
Caption="ALAMAT"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="8" FieldName="CITY_NAME"
Caption="NAMA KOTA"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="9" FieldName="PROV_NAME"
Caption="NAMA PROPINSI"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="10" FieldName="EMP_OWNER"
Caption="NAMA OWNER"></dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn VisibleIndex="11"
FieldName="MOBILE_OWNER" Caption="NO. HP
OWNER"></dx:GridViewDataTextColumn>
</Columns>
<Settings ShowGroupPanel="True" ShowFilterRow="True"></Settings>
</dx:ASPxGridView> <BR /><dx:ASPxButton id="ASPxButton1"
onclick="ASPxButton1_Click" runat="server" Width="100px"
CssPostfix="Office2003Olive"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
__designer:wfdid="w159" Text="Open Grid"></dx:ASPxButton>
<dx:ASPxButton id="ASPxButton2" onclick="ASPxButton2_Click"
runat="server" Width="100px" CssPostfix="Office2003Olive"
CssFilePath="~/App_Themes/Office2003Olive/{0}/styles.css"
SpriteCssFilePath="~/App_Themes/Office2003Olive/{0}/sprite.css"
__designer:wfdid="w160" Text="Close Grid"
Visible="False"></dx:ASPxButton>
</ContentTemplate>
</asp:UpdatePanel></td>
</tr>
</table>
<br />
<br />
 </dx:PanelContent>
</PanelCollection>
434
<LeftEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</LeftEdge>
<HeaderContent>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</HeaderContent>
<ContentPaddings PaddingBottom="10px"
PaddingLeft="4px" PaddingTop="10px" />
<RightEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</RightEdge>
<HeaderRightEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderRightEdge.gif"
VerticalPosition="bottom" />
</HeaderRightEdge>
<Border BorderColor="#7EACB1"
BorderStyle="Solid" BorderWidth="1px" />
<HeaderStyle BackColor="White"
Height="23px">
<BorderBottom BorderStyle="None" />
<Paddings PaddingBottom="0px"
PaddingLeft="2px" PaddingTop="0px" />
</HeaderStyle>
<HeaderLeftEdge>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpHeaderLeftEdge.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</HeaderLeftEdge>
<BottomEdge BackColor="#D7E9F1">
</BottomEdge>
<NoHeaderTopEdge BackColor="#EBF2F4">
</NoHeaderTopEdge>
<Content>
<BackgroundImage
ImageUrl="~/App_Themes/Glass/Web/rpContentBack.gif"
Repeat="RepeatX"
VerticalPosition="bottom" />
</Content>
</dx:ASPxRoundPanel>
<br />
</form>
</asp:Content>
435
RegistrasiFrontliner.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//using DevExpress.Web.ASPxEditors;
using CJM.Database.Oracle;
using System.Data.OracleClient;
using CJM.Reference;
using CJM.Project.LGE;
public partial class AppModules_RegistrasiFrontliner :
System.Web.UI.Page
{
string oradb = "Data Source = (DESCRIPTION=(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT =
1521)))(CONNECT_DATA = (SERVICE_NAME =xronosit))); User
Id=buzapps; password=qwerty007;";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
txtTglLahir.Text =
DateTime.Now.ToString("dd/MM/yyyy");
tglTerima.Text = DateTime.Now.ToString("dd/MM/yyyy");
// insert propinsi manual
sdsPropinsi.SelectCommand = "SELECT ID, PROV_NAME FROM
GNRL_REF_PROVINCE ORDER BY PROV_NAME ASC";
ddlPropinsi.DataSource = sdsPropinsi;
ddlPropinsi.DataTextField = "PROV_NAME";
ddlPropinsi.DataValueField = "ID";
ddlPropinsi.DataBind();
ddlPropinsi.Items.Insert(0, new ListItem("--PILIH--",
"--PILIH--"));
// insert kota manual
ddlKota.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
// insert mall manual
ddlMall.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
// insert toko manual
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
436
}
DataBinds();
noHP.Focus();
}
private void DataBinds()
{
//string query = "SELECT A.ID AS ID, A.EMP_NAME AS
EMP_NAME, A.MOBILE_NO AS MOBILE_NO, " +
//
"WM_CONCAT(B.STORE_NAME) AS STORE_NAME,
WM_CONCAT(C.MALL_NAME) AS MALL_NAME, " +
//
"WM_CONCAT(E.CITY_NAME) AS CITY_NAME,
D.NAMA_FRONTLINER AS NAMA_FRONTLINER, " +
//
"D.HP_FRONTLINER AS HP_FRONTLINER " +
//
"FROM EMP_STORE A, GNRL_REF_STORE B,
GNRL_REF_MALL C, V_EMP_NAME_FRONTLINER D, GNRL_REF_CITY E " +
//
"WHERE A.ID_POSITION = '8' AND A.ID =
B.ID_EMP AND C.ID = B.ID_MALL AND A.ID = D.ID_PARENT " +
//
"AND E.ID = B.CITY_ID " +
//
"GROUP BY A.ID, A.EMP_NAME, A.MOBILE_NO,
D.NAMA_FRONTLINER, D.HP_FRONTLINER " +
//
"ORDER BY A.ID";
string query = "SELECT * FROM V_INFO_FRONTLINER ORDER BY
ID DESC";
OracleDataAdapter ad = new OracleDataAdapter(query,
ConnOracle.ConnOra());
DataSet ds = new DataSet();
ad.Fill(ds);
ASPxGridView1.DataSource = ds;
ASPxGridView1.DataBind();
}
protected void btnSave_Click(object sender, EventArgs e)
{
if (namaLengkap.Text.Length == 0 ||
namaLengkap.Text.Length < 3)
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('Nama
Lengkap tidak boleh kosong.')\", 0);", true);
namaLengkap.Focus();
}
else if (noHP.Text.Length == 0)
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('No HP
tidak boleh kosong.')\", 0);", true);
noHP.Focus();
}
else if (noHP.Text.Length < 5)
{
437
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('No HP
kurang dari lima digit.')\", 0);", true);
noHP.Focus();
}
else if (!CheckIfNumberic(noHP.Text.Trim()))
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('No HP
harus angka.')\", 0);", true);
noHP.Focus();
}
else if (ddlJenisKelamin.SelectedValue == "--PILIH--")
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('Jenis
Kelamin harus dipilih.')\", 0);", true);
ddlJenisKelamin.Focus();
}
else if (ddlPropinsi.SelectedValue == "--PILIH--")
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Propinsi harus dipilih.')\", 0);",
true);
ddlPropinsi.Focus();
}
else if (ddlKota.SelectedValue == "--PILIH--")
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('Kota
harus dipilih.')\", 0);", true);
ddlKota.Focus();
}
else if (ddlMall.SelectedValue == "--PILIH--")
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('Mall
harus dipilih.')\", 0);", true);
ddlMall.Focus();
}
else if (ddlToko.SelectedValue == "--PILIH--")
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('Toko
harus dipilih.')\", 0);", true);
ddlToko.Focus();
}
else
{
//INFORMASI KARYAWAN TOKO
string fNamaKaryawan = namaLengkap.Text.Replace("'",
"\''");
//Nama Lengkap Karyawan
string fJenkel = ddlJenisKelamin.SelectedItem.Value;
//Jenis Kelamin Karyawan
string fTglLahir = ForNET.DateToDB(txtTglLahir.Text);
//Tanggal Lahir Karyawan
string fNoHP = noHP.Text.Trim();
//NO HP Karyawan
438
string fAlamat = txtAlamatOwner.Text;
//Alamat Karyawan
//INFORMASI TOKO DAN PEMILIK TOKO
string tNamaPropinsi = ddlPropinsi.SelectedItem.Value;
//Nama Propinsi
string tNamaKota = ddlKota.SelectedItem.Value;
//Nama Kota
string tIDToko = ddlToko.SelectedItem.Value;
//ID TOKO buat Karyawan
//INFORMASI PETUGAS DELL
//string fNamaPetugasDELL =
namaPetugas.Text.Replace("'", "\''");
//Nama Petugas
DELL
string fTglRegister = ForNET.DateToDB(tglTerima.Text);
//Tanggal Terima
string queryIDParent = "SELECT A.ID FROM EMP_STORE A,
GNRL_REF_STORE B " +
"WHERE B.ID_EMP = A.ID AND B.ID
= '" + ddlToko.SelectedItem.Value + "'";
string tIDParent =
ConnOracle.ExecQueryScalarConnOra(queryIDParent).ToString();
string queryKaryawan = "INSERT INTO EMP_STORE " +
" (EMP_NAME, ID_USER,
INPUT_BY,UPDATE_BY,COMP_ID, SEX, DATE_BIRTH, MOBILE_NO, ADDRESS,
PROV_ID, CITY_ID, INPUT_DATE, " +
" ID_PARENT, ID_POSITION)" +
" VALUES(UPPER('" +
fNamaKaryawan + "'),'" +
Session["SESS_USER_ID"] + "', '" +
Session["SESS_USER_ID"] + "', '" +
Session["SESS_USER_ID"] + "', '" +
Session["SESS_COMP_ID"] + "', '" +
fJenkel + "'," +
fTglLahir + ",'" +
fNoHP + "','" +
fAlamat + "','" +
tNamaPropinsi + "','" +
tNamaKota + "'," +
fTglRegister + ",'" +
tIDParent + "', '9')";
bool suksesInsertKaryawan =
ConnOracle.ExecNonQueryConnOra(queryKaryawan);
string queryKaryawanToToko = "INSERT INTO EMP_TO_STORE
" +
" (STORE_ID, ID_EMP)" +
" VALUES('" + tIDToko + "','" +
tIDParent + "')";
bool suksesInsertKaryawanToToko =
ConnOracle.ExecNonQueryConnOra(queryKaryawanToToko);
439
if (suksesInsertKaryawan)
{
if(suksesInsertKaryawanToToko)
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Success.')\", 0);", true);
KosongIN();
cmdNoHP.Visible = true;
Disable();
DataBinds();
}
else
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed To Store.')\", 0);",
true);
}
}
else
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert",
"window.setTimeout(\"alert('Insert Failed EMP Store.')\", 0);",
true);
}
}
}
protected void ddlPropinsi_SelectedIndexChanged(object sender,
EventArgs e)
{
if (ddlPropinsi.SelectedValue == "--PILIH--")
{
// insert kota manual
ddlKota.Items.Clear();
ddlKota.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
// insert mall manual
ddlMall.Items.Clear();
ddlMall.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
// insert toko manual
ddlToko.Items.Clear();
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
}
else
{
440
sdsKota.SelectCommand = "SELECT ID, CITY_NAME FROM
GNRL_REF_CITY WHERE PROV_ID = '" + ddlPropinsi.SelectedValue + "'
ORDER BY CITY_NAME ";
// insert kota manual
ddlKota.Items.Clear();
ddlKota.DataSource = sdsKota;
ddlKota.DataTextField = "CITY_NAME";
ddlKota.DataValueField = "ID";
ddlKota.DataBind();
ddlKota.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
// insert mall manual
ddlMall.Items.Clear();
ddlMall.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
// insert toko manual
ddlToko.Items.Clear();
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
}
}
protected void ddlKota_SelectedIndexChanged(object sender,
EventArgs e)
{
if (ddlKota.SelectedValue == "--PILIH--")
{
ddlMall.Items.Clear();
ddlMall.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
ddlToko.Items.Clear();
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
}
else
{
sdsMall.SelectCommand = "SELECT ID, MALL_NAME FROM
GNRL_REF_MALL WHERE CITY_ID = '" + ddlKota.SelectedValue + "'
ORDER BY MALL_NAME ";
// insert mall manual
ddlMall.Items.Clear();
ddlMall.DataSource = sdsMall;
ddlMall.DataTextField = "MALL_NAME";
ddlMall.DataValueField = "ID";
ddlMall.DataBind();
ddlMall.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
}
}
private void DisableInformasiToko()
{
441
ddlPropinsi.Enabled = false;
ddlKota.Enabled = false;
ddlMall.Enabled = false;
ddlToko.Enabled = false;
txtAlamatToko.Enabled = false;
lt.Enabled = false;
blok.Enabled = false;
no.Enabled = false;
txtNamaOwner.Enabled = false;
txtNoHPOwner.Enabled = false;
}
private void EnableInformasiToko()
{
ddlPropinsi.Enabled = true;
ddlKota.Enabled = true;
ddlMall.Enabled = true;
ddlToko.Enabled = true;
//txtAlamatToko.Enabled = true;
//lt.Enabled = true;
//blok.Enabled = true;
//no.Enabled = true;
//txtNamaOwner.Enabled = true;
//txtNoHPOwner.Enabled = true;
}
private void DefaultInformasiToko()
{
ddlPropinsi.SelectedValue = "--PILIH--";
ddlKota.Items.Clear();
ddlKota.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
ddlMall.Items.Clear();
ddlMall.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
ddlToko.Items.Clear();
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
txtAlamatToko.Text = "";
lt.Text = "";
blok.Text = "";
no.Text = "";
txtNamaOwner.Text = "";
txtNoHPOwner.Text = "";
}
protected void ddlToko_SelectedIndexChanged(object sender,
EventArgs e)
{
442
OracleConnection conn = new OracleConnection();
conn.ConnectionString = oradb;
try
{
conn.Open();
OracleCommand cmd = new OracleCommand("SELECT
A.MOBILE_NO AS MOBILE_NO, A.EMP_NAME AS EMP_NAME, B.FLOOR AS
FLOOR, B.BLOCK_STORE AS BLOCK_STORE, " +
" B.ADDRESS AS
ADDRESS FROM EMP_STORE A, GNRL_REF_STORE B WHERE B.ID_EMP = A.ID
AND B.ID = '" + ddlToko.SelectedItem.Value + "'", conn);
OracleDataReader dr = cmd.ExecuteReader();
if (dr.HasRows == false)
{
throw new Exception();
}
if (dr.Read())
{
try
{
txtAlamatToko.Text = dr["ADDRESS"].ToString();
lt.Text = dr["FLOOR"].ToString();
blok.Text = dr["BLOCK_STORE"].ToString();
txtNamaOwner.Text = dr["EMP_NAME"].ToString();
txtNoHPOwner.Text =
dr["MOBILE_NO"].ToString();
dr.Dispose();
cmd.Dispose();
}
catch(Exception)
{
}
}
}
catch (Exception) { }
finally
{
conn.Dispose();
}
//try
//{
//
string queryNOToko = "";
//
string valueNOToko = "";
//
queryNOToko = "SELECT NO_STORE FROM GNRL_REF_STORE
WHERE ID = '" + ddlToko.SelectedItem.Value + "'";
//
valueNOToko =
ConnOracle.ExecQueryScalarConnOra(queryNOToko).ToString();
//
no.Text = valueNOToko;
//}
//catch(Exception)
//{
443
//}
DisableInformasiToko();
btnCancelInformasiToko.Enabled = true;
//namaPetugas.Focus();
}
protected void ddlMall_SelectedIndexChanged(object sender,
EventArgs e)
{
if (ddlMall.SelectedValue == "--PILIH--")
{
ddlToko.Items.Clear();
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
}
else
{
sdsToko.SelectCommand = "SELECT ID, STORE_NAME FROM
GNRL_REF_STORE WHERE ID_MALL = '" + ddlMall.SelectedValue + "'
ORDER BY STORE_NAME ";
// insert mall manual
ddlToko.Items.Clear();
ddlToko.DataSource = sdsToko;
ddlToko.DataTextField = "STORE_NAME";
ddlToko.DataValueField = "ID";
ddlToko.DataBind();
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
}
}
private void Enable()
{
namaLengkap.Enabled = true;
ddlJenisKelamin.Enabled = true;
txtTglLahir.Enabled = true;
txtAlamatOwner.Enabled = true;
ddlPropinsi.Enabled = true;
ddlKota.Enabled = true;
ddlMall.Enabled = true;
ddlToko.Enabled = true;
//txtAlamatToko.Enabled = true;
//lt.Enabled = true;
//blok.Enabled = true;
//no.Enabled = true;
//txtNamaOwner.Enabled = true;
//txtNoHPOwner.Enabled = true;
//namaPetugas.Enabled = true;
tglTerima.Enabled = true;
444
btnSave.Enabled = true;
btnCancel.Enabled = true;
}
private void Disable()
{
namaLengkap.Enabled = false;
ddlJenisKelamin.Enabled = false;
txtTglLahir.Enabled = false;
txtAlamatOwner.Enabled = false;
ddlPropinsi.Enabled = false;
ddlKota.Enabled = false;
ddlMall.Enabled = false;
ddlToko.Enabled = false;
txtAlamatToko.Enabled = false;
lt.Enabled = false;
blok.Enabled = false;
no.Enabled = false;
txtNamaOwner.Enabled = false;
txtNoHPOwner.Enabled = false;
//namaPetugas.Enabled = false;
tglTerima.Enabled = false;
btnSave.Enabled = false;
btnCancel.Enabled = false;
btnCancelInformasiToko.Enabled = false;
}
private void KosongIN()
{
namaLengkap.Text = "";
ddlJenisKelamin.SelectedValue = "--PILIH--";
txtTglLahir.Text = DateTime.Now.ToString("dd/MM/yyyy");
txtAlamatOwner.Text = "";
ddlPropinsi.SelectedValue = "--PILIH--";
ddlKota.Items.Clear();
ddlKota.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
ddlMall.Items.Clear();
ddlMall.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
ddlToko.Items.Clear();
ddlToko.Items.Insert(0, new ListItem("--PILIH--", "-PILIH--"));
txtAlamatToko.Text = "";
lt.Text = "";
blok.Text = "";
no.Text = "";
445
txtNamaOwner.Text = "";
txtNoHPOwner.Text = "";
//namaPetugas.Text = "";
tglTerima.Text = DateTime.Now.ToString("dd/MM/yyyy");
noHP.Text = "";
}
private void DisableInformasiKaryawan()
{
noHP.Enabled = false;
namaLengkap.Enabled = false;
ddlJenisKelamin.Enabled = false;
txtAlamatOwner.Enabled = false;
cmdNoHP.Visible = false;
}
private void EnableInformasiKaryawan()
{
ddlPropinsi.Enabled = true;
ddlKota.Enabled = true;
ddlMall.Enabled = true;
ddlToko.Enabled = true;
//namaPetugas.Enabled = true;
tglTerima.Enabled = true;
btnSave.Enabled = true;
btnCancel.Enabled = true;
ddlPropinsi.Focus();
}
public static void ShowAlertMessage(string error)
{
Page page = HttpContext.Current.Handler as Page;
if (page != null)
{
error = error.Replace("'", "\'");
ScriptManager.RegisterStartupScript(page,
page.GetType(), "err_msg", "alert('" + error + "');", true);
}
}
protected void cmdNoHP_Click(object sender, EventArgs e)
{
string inNoHP = noHP.Text.Trim();
int jumlah;
if (inNoHP == "")
{
446
//ShowAlertMessage("NO HP");
//ScriptManager.RegisterClientScriptBlock(this,
this.GetType(), "str", "<script
language='javascript'>alert('Inserted Emails
Successfully');</script>", false);
//ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), ("dialogJavascript" + this.ID),
"alert(\"Registered\");", true);
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('No HP
tidak boleh kosong')\", 1);", true);
noHP.Focus();
}
else if (inNoHP.Length < 5)
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('No HP
kurang dari lima digit.')\", 0);", true);
noHP.Focus();
}
else if (!CheckIfNumberic(inNoHP))
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('No HP
harus angka.')\", 0);", true);
noHP.Focus();
}
else
{
string myQuery = "SELECT COUNT(MOBILE_NO) FROM
EMP_STORE WHERE MOBILE_NO = '" + inNoHP + "' AND ID_POSITION = 9";
jumlah =
int.Parse(ConnOracle.ExecQueryScalarConnOra(myQuery).ToString());
if (jumlah > 0)
{
ScriptManager.RegisterClientScriptBlock(this,
typeof(Page), "validationAlert", "window.setTimeout(\"alert('No HP
sudah ada. Anda sudah pernah registrasi!!!')\", 0);", true);
noHP.Focus();
//Alert.Show("No HP sudah ada. Anda hanya bisa
mengisi informasi TOKO!!!");
//noHP.Focus();
//Ini untuk koneksi hosting
//string oradb = "Data Source =
(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =
blitz.co.id)(PORT = 1521)))(CONNECT_DATA = (SERVICE_NAME
=buzdev))); User Id=buzapps; password=qwerty007;";
//string oradb = "Data Source =
(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST =
localhost)(PORT = 1521)))(CONNECT_DATA = (SERVICE_NAME =o11g)));
User Id=buzapps; password=qwerty007;";
//OracleConnection conn = new OracleConnection();
//conn.ConnectionString = oradb;
447
//try
//{
//
conn.Open();
//
OracleCommand cmd = new
OracleCommand("SELECT EMP_NAME, SEX, DATE_BIRTH, ADDRESS FROM
EMP_STORE " +
//
" WHERE
MOBILE_NO = '" + inNoHP + "' AND ID_POSITION = 9", conn);
//
OracleDataReader dr = cmd.ExecuteReader();
//
if (dr.HasRows == false)
//
{
//
throw new Exception();
//
}
//
if (dr.Read())
//
{
//
try
//
{
//
string jenkel = "";
//
namaLengkap.Text =
dr["EMP_NAME"].ToString();
//
jenkel = dr["SEX"].ToString();
//
//
if (jenkel == "L")
{
//
ddlJenisKelamin.SelectedItem.Text = "LAKI-LAKI";
//
}
//
else
//
{
//
ddlJenisKelamin.SelectedItem.Text = "PEREMPUAN";
//
}
//
txtTglLahir.Text =
dr["DATE_BIRTH"].ToString().Substring(0,10);
//
txtAlamatOwner.Text =
dr["ADDRESS"].ToString();
//
//
//
//
//
//
//
dr.Dispose();
cmd.Dispose();
}
catch (Exception)
{
}
}
//}
//catch (Exception) { }
//finally
//{
//
conn.Dispose();
//}
448
//DisableInformasiKaryawan();
//EnableInformasiKaryawan();
//ASPxCheckBox1.Visible = true;
}
else
{
cmdNoHP.Visible = false;
Enable();
namaLengkap.Focus();
}
}
}
bool CheckIfNumberic(string myNumber)
{
bool IsNum = true;
for (int index = 0; index < myNumber.Length; index++)
{
if (!Char.IsNumber(myNumber[index]))
{
IsNum = false;
break;
}
}
return IsNum;
}
protected void ASPxGridView1_StartRowEditing(object sender,
DevExpress.Web.Data.ASPxStartRowEditingEventArgs e)
{
e.Cancel = true;
Response.Redirect("EditForm.aspx?KeyValue=" +
e.EditingKeyValue);
}
protected void ASPxGridView1_RowCommand(object sender,
DevExpress.Web.ASPxGridView.ASPxGridViewRowCommandEventArgs e)
{
}
protected void btnCancelInformasiToko_Click(object sender,
EventArgs e)
{
EnableInformasiToko();
DefaultInformasiToko();
ddlPropinsi.Focus();
btnCancelInformasiToko.Enabled = false;
}
protected void btnCancel_Click(object sender, EventArgs e)
{
KosongIN();
cmdNoHP.Visible = true;
noHP.Enabled = true;
Disable();
}
449
//============ open grid
protected void ASPxButton1_Click(object sender, EventArgs e)
{
ASPxGridView1.Visible = true;
ASPxButton1.Visible = false;
ASPxButton2.Visible = true;
}
protected void ASPxButton2_Click(object sender, EventArgs e)
{
ASPxGridView1.Visible = false;
ASPxButton1.Visible = true;
ASPxButton2.Visible = false;
}
Download