Ejemplo n.º 1
0
        void fncRefreshReport()
        {
            try
            {
                string selQuery = "select uName,Campaign_Id,Status,Group_Name,Phone_No,callDuration from Active_call";
                OpenConnection();
                SqlCeDataAdapter adp = new SqlCeDataAdapter(selQuery, LocalSQLConn);
                DataSet          ds  = new DataSet();
                adp.Fill(ds);
                List <ActiveCall> objActiveCall = new List <ActiveCall>();
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    DataSet dsCampName = new DataSet();
                    System.Data.SqlClient.SqlConnection  conn       = new System.Data.SqlClient.SqlConnection(ConnectionString);
                    System.Data.SqlClient.SqlCommand     cmd        = new System.Data.SqlClient.SqlCommand("Select Name from Campaign where ID='" + ds.Tables[0].Rows[i]["Campaign_Id"].ToString() + "'", conn);
                    System.Data.SqlClient.SqlDataAdapter daCampName = new System.Data.SqlClient.SqlDataAdapter(cmd);
                    daCampName.Fill(dsCampName);
                    objActiveCall.Add(ActiveCall.Create(ds.Tables[0].Rows[i]["uName"].ToString(), dsCampName.Tables[0].Rows[0][0].ToString(), ds.Tables[0].Rows[i]["Status"].ToString(), ds.Tables[0].Rows[i]["Group_Name"].ToString(), ds.Tables[0].Rows[i]["Phone_No"].ToString(), ds.Tables[0].Rows[i]["callDuration"].ToString()));
                }

                AgentItems.ItemsSource = objActiveCall;
                closeConnection();
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "fncRefreshReport()", "ctlrptActiveCall.xaml.cs");
            }
        }
Ejemplo n.º 2
0
 public static ActiveCall Create(string uName, string Camapign_Id, string Status,string Group_Name,string Phone_No,string callDuration)
 {
     ActiveCall ai = new ActiveCall();
     ai.uName = uName;
     ai.Campaign_Id = Camapign_Id;
     ai.Status = Status;
     ai.Group_Name = Group_Name;
     ai.Phone_No = Phone_No;
     ai.callDuration = callDuration;
     return ai;
 }
Ejemplo n.º 3
0
        public static ActiveCall Create(string uName, string Camapign_Id, string Status, string Group_Name, string Phone_No, string callDuration)
        {
            ActiveCall ai = new ActiveCall();

            ai.uName        = uName;
            ai.Campaign_Id  = Camapign_Id;
            ai.Status       = Status;
            ai.Group_Name   = Group_Name;
            ai.Phone_No     = Phone_No;
            ai.callDuration = callDuration;
            return(ai);
        }