|
If it is web based, you are probably going to want to use JavaScript at some point. You might use CoffeeScript or Typescript as an abstraction, but ultimately they will be producing JavaScript.
|
|
|
|
|
After 2011 Hans doesn't write the new articles and he doesn't have any discussions.
His website is currently not available.
Several of my attempts to email him have gone unanswered.
Does anyone know what happened?
|
|
|
|
|
|
Thanks, but it's his old email. Unfortunately it's not availabled now.
|
|
|
|
|
Forgot to tell you. You just post this same question in Lounge. Possibly you could get some help.
|
|
|
|
|
I'm sorry but what's Lounge!?
|
|
|
|
|
|
It happens. I have never used this discussion yet. My root discussion is C/C++/MFC
Thanks again. I'll post the question there
|
|
|
|
|
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
/// <summary>
/// Summary description for Dbsupport
/// </summary>
public class Dbsupport
{
SqlConnection con;
SqlCommand cmd = new SqlCommand();
DataTable dt = new DataTable();
ListItem lstItem;
public string excep = "", strExp;
string connectionstring = ConfigurationManager.ConnectionStrings["con"].ConnectionString.ToString();
#region get connection string
public void GetCon()
{
try
{
if (con == null)
{
con = new SqlConnection(connectionstring);
con.Open();
}
if (con.State == ConnectionState.Closed)
{
con.Open();
}
}
catch (Exception ex)
{
string abc = ex.Message.ToString();
}
}
#endregion
#region Close Connection to the sql server
public void CloseCon()
{
try
{
if (con.State == ConnectionState.Open)
{
con.Close();
}
}
catch
{
}
}
#endregion
#region Dispose Connection to the sql server
public void DisposeConnection()
{
try
{
if (!((con == null)))
{
con.Dispose();
con = null;
}
}
catch
{
}
}
#endregion
#region Insert value
public int ExecuteStorProc(string strsql, SqlParameter[] Sparam)
{
int i = 0;
try
{
GetCon();
cmd.Connection = con;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = strsql;
cmd.CommandTimeout = 1000;
SqlParameter param = new SqlParameter();
foreach (SqlParameter lparam in Sparam)
{
//param=lparam;
cmd.Parameters.Add(lparam);
}
i = cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
CloseCon();
DisposeConnection();
return i;
}
catch (Exception ex)
{
excep = ex.Message;
CloseCon();
DisposeConnection();
return i;
}
}
#endregion
#region Retirve the database value in DataTable
public DataTable GetDataTable(string strsql1)
{
GetCon();
DataTable dt = new DataTable();
try
{
SqlDataAdapter da = new SqlDataAdapter();
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = strsql1;
cmd.CommandTimeout = 2000;
da.SelectCommand = cmd;
da.Fill(dt);
CloseCon();
DisposeConnection();
return dt;
}
catch (Exception ex)
{
string excep = ex.Message;
CloseCon();
DisposeConnection();
return dt;
}
}
#endregion
#region Execute sqlquery Insert ,update and delete in sql server
public int ExecuteSql(string strsql)
{
int i = 0;
try
{
GetCon();
cmd.Connection = con;
cmd.CommandType = CommandType.Text;
cmd.CommandText = strsql;
cmd.CommandTimeout = 100;
i = cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
CloseCon();
DisposeConnection();
return i;
}
catch (Exception ex)
{
strExp = ex.Message;
CloseCon();
DisposeConnection();
return i;
}
}
#endregion
#region Execute sqlTransaction
public int ExecuteSqlTrans(string[] strsql)
{
int i = 0;
SqlTransaction transaction = null;
GetCon();
cmd.Connection = con;
transaction = con.BeginTransaction();
cmd.Transaction = transaction;
cmd.CommandType = CommandType.Text;
try
{
i = 1;
// Assign Transaction to Command
for (int j = 0; j < strsql.Length; j++)
{
cmd.CommandText = strsql[j].ToString().Trim();
cmd.CommandTimeout = 100;
i = cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
}
transaction.Commit();
CloseCon();
DisposeConnection();
return i;
}
catch (Exception ex)
{
i = 0;
string strExp = ex.Message;
transaction.Rollback();
CloseCon();
DisposeConnection();
return i;
}
}
#endregion
#region Retirve database value in DataSet
public DataSet GetDataSet(string strsql)
{
GetCon();
DataSet ds = new DataSet();
ds.Clear();
try
{
SqlDataAdapter da = new SqlDataAdapter();
SqlCommand cmd = new SqlCommand();
cmd.Connection = con;
cmd.CommandText = strsql;
cmd.CommandTimeout = 1000;
da.SelectCommand = cmd;
da.Fill(ds);
CloseCon();
DisposeConnection();
return ds;
}
catch (Exception ex)
{
string stexp = ex.Message;
CloseCon();
DisposeConnection();
return ds;
}
}
#endregion
#region fill value in dropdown box
public void populateDropdown(DropDownList drpControl, string topstr, string strQuery)
{
//GetCon();
//cmd.CommandText = strQuery;
//cmd.Connection = con;
////Sqlreader = cmd.ExecuteReader();
//da.SelectCommand = cmd;
//dt.Clear();
//da.Fill(dt);
//lstItem = new ListItem();
//lstItem.Text = topstr;
//lstItem.Value = topstr;
//drpControl.Items.Clear();
//drpControl.Items.Add(lstItem);
//DataTableReader Dr = new DataTableReader(dt);
//while (Dr.Read())
//{
// lstItem = new ListItem();
// lstItem.Text = Dr[0].ToString();//Sqlreader[0].ToString();
// lstItem.Value = Dr[0].ToString(); // Sqlreader[0].ToString();
// drpControl.Items.Add(lstItem);
//}
//Dr.Close();
dt = GetDataTable(strQuery);
lstItem = new ListItem();
drpControl.Items.Clear();
lstItem.Text = topstr;
lstItem.Value = topstr;
drpControl.Items.Add(lstItem);
if (dt.Rows.Count > 0)
{
foreach (DataRow dr in dt.Rows)
{
lstItem = new ListItem();
lstItem.Text = dr[0].ToString();
lstItem.Value = dr[0].ToString();
drpControl.Items.Add(lstItem);
}
}
}
#endregion
}
|
|
|
|
|
Was there supposed to be a question in there somewhere?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
<%@ Page Language="C#" AutoEventWireup="true" Theme="Griedviewtheme" MasterPageFile="~/Panel/AgentMasterPage.master" CodeFile="SelectedServices.aspx.cs" Inherits="Panel_AgentPanel_SelectedServices" %>
<asp:Content ID="con1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<script type="text/javascript" src="../../JS/Checkbox.js" language ="javascript"></script>
<asp:Panel ID="Panel1" runat="server" Width="100%">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td class="commentheader1">
Active Services</td>
<td class="right">
<asp:LinkButton ID="lnkbt_changepwd" runat="server" OnClick="lnkbt_changepwd_Click" Font-Underline="false" >Change Pwd</asp:LinkButton>
<asp:Image ID="Image1" runat="server" Height="10px" ImageUrl="~/Image/seprator.gif" Width="1px" />
<asp:LinkButton ID="lbt_logout" runat="server" OnClick="lbt_logout_Click" Font-Underline="false">Logout</asp:LinkButton></td>
</tr>
<tr>
<td colspan="2" class="right" style="height: 15px">
</td>
</tr>
<tr>
<td colspan="2" class="error">
<asp:Label ID="lb_error" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td class="space" colspan="2">
</td>
</tr>
<tr>
<td colspan="2">
<asp:GridView ID="gd_skills1" Width="730px" runat="server" OnRowCreated="gd_skills1_RowCreated" AutoGenerateColumns="False" >
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:CheckBox ID="chkBxHeader" runat="server" Text="Select All"/>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkBxSelect" runat="server"/>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="fullnameservice" HeaderText="Services" >
<ItemStyle HorizontalAlign="Left" Width="50%" />
</asp:BoundField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td>
</td>
<td class="space">
</td>
</tr>
<tr>
<td >
<asp:Button ID="bt_ok" runat="server" OnClick="bt_ok_Click" Text="OK" Width="68px" /></td>
<td >
</td>
</tr>
</table>
</asp:Panel>
</asp:Content>
Arvind
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 MySql.Data.MySqlClient;
using System.Text.RegularExpressions;
using System.IO;
using QMS_Component;
using QMS_Transaction;
using System.Diagnostics;
using QMS_MainControl;
public partial class Panel_AgentPanel_SelectedServices : System.Web.UI.Page
{
DataBaseSupport db = new DataBaseSupport();
DataTable dt = new DataTable();
public static bool service_count;
Transaction tr = new Transaction();
EventsLog EL = new EventsLog();
string fname, pageName = "Selected Services Page", Tab = " ", serverlog;
BussinessFunction BF = new BussinessFunction();
LogStatus logStatus = new LogStatus();
int logLevelSet, level;
string uniqueId;
bool writeErrorLog = false;
# region Page loading---------
protected void Page_Load(object sender, EventArgs e)
{
try
{
uniqueId = BF.UniqueId();
logLevelSet = logStatus.logStatusLevel(uniqueId);
level = 2;
Tab = " ==>";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
Tab = " ";
fname = Transaction.file_name;
// update agentloginsession
Logout_Update();
Transaction.val = "";
if (Session["AID"] == null)
{
logout();
Response.Redirect("~/Panel/AgentPanel/sessionexpired.aspx");
}
else
{
lnkbt_changepwd.Attributes.Add("onclick", "window.open ('../agentpanel/changepwd.aspx','popupwindow','width=780,height=350,scrollbars,resizable')");
if (!(Page.IsPostBack))
{
string CounterNo = "";
string aid = Convert.ToString(Session["AID"]);
show_sessioninfo(aid);
string ipAddr = Request.ServerVariables["REMOTE_ADDR"].ToString();
string ip_ctr = "select distinct CounterNo from Counter where IP='" + ipAddr + "' and counterstatus=1"; // Get counter no
dt = db.GetDataTable(ip_ctr);
if (dt.Rows.Count > 0)
{
CounterNo = dt.Rows[0][0].ToString();
}
showServices1(aid, CounterNo);
//showServices2(aid, CounterNo);
}
}
}
catch (Exception ex)
{
serverlog = "Exception:-" + ex.Message.ToString();
level = 3;
writeErrorLog = true;
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
}
}
# endregion
# region Logout_Update function
public void Logout_Update()
{
try
{
string ipAddr = "", Counter = "", AID = "", logout = "";
//Get AgentID of the hitter Counter
ipAddr = Request.ServerVariables["REMOTE_ADDR"].ToString();
string ip_ctr = "select distinct CounterNo from Counter where IP='" + ipAddr + "'";
dt = db.GetDataTable(ip_ctr);
if (dt.Rows.Count > 0)
{
Counter = dt.Rows[0][0].ToString();
}
string ip_agent = "select distinct AgentID from agentloginsession where logstatus='1' and CounterNo='" + Counter + "'"; // Get AgentID
dt = db.GetDataTable(ip_agent);
if (dt.Rows.Count > 0)
{
AID = dt.Rows[0][0].ToString();
}
level = 1;
serverlog = "Process:Agent " + AID + " is being logout updated...................";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
//Call logoutagent stored procedure
logout = "updatelogoutagent";
MySqlParameter[] param = new MySqlParameter[1];
param[0] = new MySqlParameter("AID", AID);
int i = db.ExecuteStorPro(logout, param);
if (i > 0)
{
level = 2;
serverlog = "Success:Agent " + AID + " logout updated successfuly.";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
}
}
catch (Exception ex)
{
serverlog = "Exception:-" + ex.Message.ToString();
level = 3;
writeErrorLog = true;
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
}
}
# endregion
# region Logout function
public void logout()
{
try
{
string ipAddr = "", Counter = "", AID = "", logout = "";
//Get AgentID of the hitter Counter
ipAddr = Request.ServerVariables["REMOTE_ADDR"].ToString();
string ip_ctr = "select distinct CounterNo from Counter where IP='" + ipAddr + "'";
dt = db.GetDataTable(ip_ctr);
if (dt.Rows.Count > 0)
{
Counter = dt.Rows[0][0].ToString();
}
string ip_agent = "select distinct AgentID from agentloginsession where logstatus='1' and CounterNo='" + Counter + "'";
dt = db.GetDataTable(ip_agent);
if (dt.Rows.Count > 0)
{
AID = dt.Rows[0][0].ToString();
}
level = 3;
writeErrorLog = true;
serverlog = "Error:Agent " + AID + " is being logout due to session expiration............";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
string time1 = DateTime.Now.TimeOfDay.ToString();
DateTime l_time = Convert.ToDateTime(time1);
string logouttime = DateTime.Now.ToString();
DateTime lgtime = Convert.ToDateTime(logouttime);
string reason_txt = "Session expired";
//Call logoutagent stored procedure
logout = "logoutagent";
MySqlParameter[] param = new MySqlParameter[3];
//param[0] = new MySqlParameter("Counter", Counter);
param[0] = new MySqlParameter("AID", AID);
////param[1] = new MySqlParameter("l_time", l_time);
param[1] = new MySqlParameter("l_time", lgtime);
param[2] = new MySqlParameter("Reason", reason_txt);
int i = db.ExecuteStorPro(logout, param);
if (i > 0)
{
string del_xtragent = "delete from extraagentservice where AgentID='" + AID + "'";
int del = db.ExecuteMySql(del_xtragent);
string del_temptab = "delete from temptab where AgentID='" + AID + "'";
int del_1 = db.ExecuteMySql(del_temptab);
////string agentlogout = "update agentloginsession set SessionTime= timediff(LogoutTime,LoginTime),safestatus='u',DataSendFlag=0 where (AgentID='" + AID + "')";
string agentlogout = "update agentloginsession set SessionTime= timediff(LogoutDateTime,LoginDateTime),safestatus='u',DataSendFlag=0 where (AgentID='" + AID + "')";
int j = db.ExecuteMySql(agentlogout);
level = 2;
serverlog = "Success:Agent " + AID + " loggedout successfuly due to session expiration.";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
}
else
{
level = 3;
writeErrorLog = true;
serverlog = "Error:Unable to logout agent " + AID;
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
}
}
catch (Exception ex)
{
serverlog = "Exception:-" + ex.Message.ToString();
level = 3;
writeErrorLog = true;
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
}
}
# endregion
# region OK Button click
protected void bt_ok_Click(object sender, EventArgs e)
{
try
{
Session["BuzzCount"] = 0;
Session["BuzzTicket"] = 0;
Session["Flag"] = false;
Session["AssignTime"] = "0";
Session["Ticket"] = "0";
Session["StopAutoTicket"] = "0";
//Session["IsPostbackTrue"] = "True";
string aid = Convert.ToString(Session["AID"]);
level = 1;
serverlog = "Process:Agent " + aid + " pressed OK button.";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
int cnfm;
save_services(aid, out cnfm);
if (cnfm == 1)
{
Response.Redirect("~/Panel/AgentPanel/NewAssignpage.aspx");
}
else
{
level = 3;
writeErrorLog = true;
serverlog = "Error:Agent " + aid + " didn't choose atleast one service.";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
lb_error.Visible = true;
lb_error.Text = "*Please choose atleast one service.";
}
}
catch (Exception ex)
{
serverlog = "Exception:-" + ex.Message.ToString();
level = 3;
writeErrorLog = true;
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
}
}
# endregion
# region Save_Services function
public void save_services(string aid, out int cnfm)
{
try
{
level = 1;
serverlog = "Process:Saving of services for agent " + aid + " is being processed.................";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
//save data of first grid
string rw = "", ser = "", ipAddr = "", Counter = "";
int y = 0;
ipAddr = Request.ServerVariables["REMOTE_ADDR"].ToString();
string ip_ctr = "select distinct CounterNo from Counter where counterstatus=1 and IP='" + ipAddr + "'";
dt = db.GetDataTable(ip_ctr);
if (dt.Rows.Count > 0)
{
Counter = dt.Rows[0][0].ToString();
string str_del = "delete from extraagentservice where agentid='" + aid + "'";
int d = db.ExecuteMySql(str_del);
for (int i = 0; i < gd_skills1.Rows.Count; i++)
{
GridViewRow row = gd_skills1.Rows[i];
bool ischecked = ((CheckBox)row.FindControl("chkBxSelect")).Checked;
if (ischecked)
{
rw = gd_skills1.Rows[i].Cells[1].Text;
////string convertSer = "select service from services where sStatus=1 and fullnameservice='" + rw + "'";
string convertSer = "select serviceno from services where sStatus=1 and fullnameservice='" + rw + "'";
dt = db.GetDataTable(convertSer);
if (dt.Rows.Count > 0)
{
ser = dt.Rows[0][0].ToString();
}
string strrefid = "select refid from clientinfo";
string refid = "";
DataTable dtt = new DataTable();
dtt = db.GetDataTable(strrefid);
if (dtt.Rows.Count > 0)
{
refid = dtt.Rows[0]["refid"].ToString();
}
string insert_exagser = "Insertextraagentservice1";
MySqlParameter[] param = new MySqlParameter[4];
param[0] = new MySqlParameter("refid", refid);
param[1] = new MySqlParameter("AID", aid);
param[2] = new MySqlParameter("TOS", ser);
param[3] = new MySqlParameter("Counter", Counter);
y = db.ExecuteStorPro(insert_exagser, param);
}
}
if (y == 1)
{
level = 2;
serverlog = "Success:Saving of services for agent " + aid + " done successfuly.";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
cnfm = 1;
}
else
{
level = 3;
writeErrorLog = true;
serverlog = "Error:Unable to save services for agent " + aid + ".";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
cnfm = 0;
}
}
else
{
level = 3;
writeErrorLog = true;
serverlog = "Error:Unable to save services for agent " + aid + " due to unable to find counter for this IP.";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
cnfm = 0;
}
}
catch (Exception ex)
{
cnfm = 0;
serverlog = "Exception:-" + ex.Message.ToString();
level = 3;
writeErrorLog = true;
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
}
}
#endregion
# region Show Services
public void showServices1(string aid, string Counter)
{
try
{
level = 1;
serverlog = "Process:Services of agent " + aid + " is being showed for grid1............";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
string str_showserv = "select s.fullnameservice from services as s where (sStatus=1 and s.serviceno in (select ag.serviceno from agentservice as ag,counter as c where (ag.agentid='" + aid + "' and c.CounterNo='" + Counter + "' and ag.serviceno=c.serviceno)))";
dt = db.GetDataTable(str_showserv);
if (dt.Rows.Count > 0)
{
level = 2;
serverlog = "Success:Services of agent " + aid + " for grid1 showed successfuly.";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
gd_skills1.DataSource = dt;
gd_skills1.DataBind();
CheckBox mychk = (CheckBox)gd_skills1.HeaderRow.FindControl("chkBxHeader");
mychk.Enabled = false;
for (int i = 0; i < gd_skills1.Rows.Count; i++)
{
GridViewRow row = gd_skills1.Rows[i];
((CheckBox)row.FindControl("chkBxSelect")).Checked = true;
((CheckBox)row.FindControl("chkBxSelect")).Enabled = false;
}
}
else
{
level = 3;
writeErrorLog = true;
serverlog = "Unable to show services of agent " + aid + " for grid1.";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
}
}
catch (Exception ex)
{
serverlog = "Exception:-" + ex.Message.ToString();
level = 3;
writeErrorLog = true;
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
}
}
# endregion
# region Show Sessioninformation
public void show_sessioninfo(string aid)
{
try
{
level = 1;
serverlog = "Process:Sessioninfo of agent " + aid + " is being showed...................";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
string ldate = "select date_format( LoginDateTime,'%Y-%m-%d') as LoginDate from agentloginsession where AgentID='" + aid + "' and logstatus=0 order by LoginDateTime desc limit 1";
dt = db.GetDataTable(ldate);
if (dt.Rows.Count > 0)
{
string last_date = dt.Rows[0][0].ToString();
string sh_lastime = "select date_format( LoginDateTime,'%b %d,%Y') as LoginDate,time(LoginDateTime) as LoginTime,date_format( LogoutDateTime,'%b %d,%Y') as LogoutDate,time(LogoutDateTime) as LogoutTime from agentloginsession where AgentID='" + aid + "' and logstatus=0 and date(LoginDateTime)='" + last_date + "' order by LoginDateTime desc limit 1";
dt = db.GetDataTable(sh_lastime);
if (dt.Rows.Count > 0)
{
level = 2;
serverlog = "Success:Sessioninfo of agent " + aid + " showed successfuly.";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
string date = dt.Rows[0][0].ToString();
lb_error.Visible = true;
lb_error.Text = "Your last session info: " + dt.Rows[0]["LoginDate"].ToString() + " " + dt.Rows[0]["LoginTime"].ToString() + " to " + dt.Rows[0]["LogoutDate"].ToString() + " " + dt.Rows[0]["LogoutTime"].ToString();
}
else
{
level = 2;
serverlog = "Success:Sessioninfo of agent " + aid + " showed successfuly.";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
lb_error.Visible = true;
lb_error.Text = "You are logged in first time";
}
}
else
{
level = 2;
serverlog = "Success:Sessioninfo of agent " + aid + " showed successfuly.";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
lb_error.Visible = true;
lb_error.Text = "You are logged in first time";
}
}
catch (Exception ex)
{
serverlog = "Exception:-" + ex.Message.ToString();
level = 3;
writeErrorLog = true;
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
}
}
# endregion
protected void lnkbt_changepwd_Click(object sender, EventArgs e)
{
lnkbt_changepwd.Attributes.Add("onclick", "window.open ('../Agentpanel/changepwd.aspx','popupwindow','width=780,height=350,scrollbars,resizable')");
}
# region LOgout Linkbutton click
protected void lbt_logout_Click(object sender, EventArgs e)
{
try
{
string aid = Convert.ToString(Session["AID"]);
level = 1;
serverlog = "Process:Agent " + aid + " pressed Logout button.";
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
/* this session object is use to identify that the
request of logout page is coming from Selected
services page not from assignform page
*/
Transaction.val = "Selected Services";
Response.Redirect("~/Panel/AgentPanel/LogOutClient.aspx");
}
catch (Exception ex)
{
serverlog = "Exception:-" + ex.Message.ToString();
level = 3;
writeErrorLog = true;
EL.GeneralLogEvents(pageName, serverlog, Tab, logLevelSet, level, uniqueId, writeErrorLog);
writeErrorLog = false;
}
}
# endregion
protected void gd_skills1_RowCreated(object sender, GridViewRowEventArgs e)
{
if ((e.Row.RowType == DataControlRowType.DataRow))
{
CheckBox chkBxSelect = (CheckBox)e.Row.Cells[1].FindControl("chkBxSelect");
CheckBox chkBxHeader = (CheckBox)this.gd_skills1.HeaderRow.FindControl("chkBxHeader");
chkBxSelect.Attributes["onclick"] = string.Format("javascript:ChildClick(this,'{0}');", chkBxHeader.ClientID);
//Generate Header Checkbox Client Script
chkBxHeader.Attributes["onclick"] = "javascript:HeaderClick(this, " + gd_skills1.ClientID + ");";
}
}
}
arvind
var TotalChkBx;
var Counter=0;
function HeaderClick(CheckBox, chkID)
{
//Get target base & child control.
var TargetBaseControl = document.getElementById(chkID);
var TargetChildControl = "chkBxSelect";
//Get all the control of the type INPUT in the base control.
var Inputs = document.getElementsByTagName("input");
//Checked/Unchecked all the checkBoxes in side the GridView.
for(var n = 0; n < Inputs.length; ++n)
if(Inputs[n].type == 'checkbox' && Inputs[n].id.indexOf(TargetChildControl,0) >= 0)
Inputs[n].checked = CheckBox.checked;
//Reset Counter
Counter = CheckBox.checked ? TotalChkBx : 0;
}
function ChildClick(CheckBox, HCheckBox)
{
//get target base & child control.
var HeaderCheckBox = document.getElementById(HCheckBox);
//Modifiy Counter;
if(CheckBox.checked && Counter < TotalChkBx)
Counter++;
else if(Counter > 0)
Counter--;
//Change state of the header CheckBox.
if(Counter < TotalChkBx)
HeaderCheckBox.checked = true;
else if(Counter == TotalChkBx)
HeaderCheckBox.checked = false;
}
|
|
|
|
|
No, a massive unformatted code-dump is still not a question.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Planning a hosting package and would need to know more about "similar priced" alternatives....
|
|
|
|
|
Don't mention Site names like this. We have zero tolerance against Spam content. I request you to edit this post. Take care next time or it may lead you to account cancellation.
"When you don't know what you're doing it's best to do it quickly"- SoMad
|
|
|
|
|
As a developer, would it be beneficial to learn multiple programming languages / stacks or just stick to the one you know.
Basically should one be a jack of all or a master of one ?
|
|
|
|
|
I would master the language that you use the most and the framework that you use the most, i.e. C# and Winforms or C# and WPF etc.
then I would move onto the next language that you have either a personal interest in or work uses and get that skill upto a decent level before mastering something else.
Just my 2 cents on the topic.
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
+5. Good advice.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Learning multiple languages is essential... and quite frankly, not that big of a deal (after a while, you'll get a kick out of being able to spot similarities and differences). If you know the benefits and drawbacks of different languages, you can always pick out the appropriate one based on the task at hand. Also, when looking for jobs, you'll likely have an easier time if you have a good breadth of knowledge (i.e. don't put all your eggs in one basket).
|
|
|
|
|
Ok, So the reason I asked this is because I am primarily a web developer using ASP.Net and C# as well as SQL for Sql Server, Javascript for good user interaction as well.
I have also done windows forms programming, as well creating applications for the desktop like windows services.
Apart from this, I have also done work on vba for Excel, Powerpoint and Access.
Now, as part of my job I accept that I may have to learn new languages to get the work of clients done, but from a general point of view, is what I'm doing right ?
The reason I ask, is because there are newer web technolgies from Microsoft, I havent had time to explore, like MVC and WCF, and I feel like I'm missing out on all of these.
|
|
|
|
|
please anybody who have the ability and intelligencies or expertise..need your helped..i need to develop some kinds of sistem that are webbased that supposely in php and can have database
|
|
|
|
|
You cannot develop a system based on a question like that, and you cannot develop it from answers in an online forum. Go and do some research into the detailed requirements of your system, before you start worrying about which language to write it in.
|
|
|
|
|
yeah..thanks for your advice,really appreciate it.I have the idea but lack of skill in programming..just know basic php,asp and sql..but actually i prefer to use php..hope can get guideline from the experts..
|
|
|
|
|
aswadmanap wrote: I have the idea but lack of skill in programming Then it is most unlikely that you have the experience for such a project. Your time would be better spent working on something simpler until your skill levels improve. Take a look at some of the articles here on CodeProject for ideas and sample code.
|
|
|
|
|
I would suggest buying a product that already exists. Otherwise, you'll need to focus on what exactly you don't know so that we can help.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Actually i know what i wants, just i dont really skilled enough to make it..
|
|
|
|
|