15,908,675 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by awaisshabir (Top 47 by date)
awaisshabir
17-Oct-17 1:24am
View
yes it is working fine with a small set of data but when i put large data then web api model class received null
awaisshabir
17-May-17 1:31am
View
you can use raw sql with the help of DbdataReader or DbdataAdpter.
awaisshabir
14-May-17 16:01pm
View
I already find this link but this is not working in ef 4.0
awaisshabir
23-Apr-17 13:23pm
View
when i change address then it show below error.
Additional information: HTTP could not register URL http://+:8080/. Your process does not have access rights to this namespace
awaisshabir
23-Nov-16 3:43am
View
if connection is fails then how to connect local database
awaisshabir
25-Oct-16 4:31am
View
I am using metrologic usb scanner , once you scan the bar code it needs a focused (text field ) where it will past the scanned code , I want to capture that scanned code using my window service which will take the code and sends it to the data base to get data when record comes back I want to initialize my win form application for populating the record details,
My client don't want my win form application to be visible on screen until the bar code is scanned and the details are fetched.
I don't know how to solve this issuse.Please guide
awaisshabir
23-Oct-16 15:30pm
View
Thanks
awaisshabir
23-Oct-16 12:39pm
View
just printing the invoice
awaisshabir
6-Oct-16 16:10pm
View
Deleted
below is my Edit code when i clicked datagrideview
private async Task GetTenant(TenantFilter filter)
{
try
{
if (filter != null)
{
using (var client = new HttpClient())
{
var serializedProduct = JsonConvert.SerializeObject(filter);
var content = new StringContent(serializedProduct, Encoding.UTF8, "application/json");
var result = await client.PostAsJsonAsync("http://localhost:64456/api/Tenant/", content);
if (result.IsSuccessStatusCode)
{
var Jsonstring = await result.Content.ReadAsStringAsync();
var respose = JsonConvert.DeserializeObject
awaisshabir
6-Oct-16 16:07pm
View
Deleted
below is my edit code when i click datgrideview row.
private async Task GetTenant(TenantFilter filter)
{
try
{
if (filter != null)
{
using (var client = new HttpClient())
{
var serializedProduct = JsonConvert.SerializeObject(filter);
var content = new StringContent(serializedProduct, Encoding.UTF8, "application/json");
var result = await client.PostAsJsonAsync("http://localhost:64456/api/Tenant/", content);
if (result.IsSuccessStatusCode)
{
var Jsonstring = await result.Content.ReadAsStringAsync();
var respose = JsonConvert.DeserializeObject
awaisshabir
3-Oct-16 14:34pm
View
TextObject -table like my Country Table where i store english text
awaisshabir
18-Sep-16 16:02pm
View
in the window application
awaisshabir
18-Sep-16 16:01pm
View
this is my interview Question that's why i am asking.
awaisshabir
18-Sep-16 16:01pm
View
this is my interview Question that's why i am asking.
awaisshabir
11-Sep-16 8:30am
View
Thanks for the reply .
in my winform application i have only one main form in that form i have menu bar,alertpanel, and container panel . and rest of all is user control.
if i click for example employee menu then employee user control load in the container panel.if i add new record in the employee the message is show in the AlertPanel like " Successfully Insert record."
awaisshabir
2-Sep-16 6:21am
View
Thanks
awaisshabir
2-Sep-16 5:54am
View
if depends on the browser but cache on the server side then how its depend on browser.
awaisshabir
28-Aug-16 1:16am
View
Context is your dbContext
i already use this code but its show the same error
'List<t>' does not contain a definition for 'GetAwaiter' and no extension method 'GetAwaiter' accepting a first argument of type 'List<t>' could be found (are you missing a using directive or an assembly reference?)
awaisshabir
23-Aug-16 10:44am
View
The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application
awaisshabir
22-Aug-16 16:43pm
View
Thanks for the reply me i will show you my code
i am used database first approach below is my class
public partial class ContextEntity : DbContext
{
public ContextEntity()
: base("name=ContextEntity")
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
}
my repository code mention below
public interface IRepository<t> where T : class
{
T Get(int ID);
IEnumerable<t> GetAll();
IEnumerable<t> Find(Expression<func<t, bool="">> predicate);
void Add(T obj);
void AddRange(IEnumerable<t> list);
///
/// Remove the object
///
/// <param name="obj"></param>
void Remove(T obj);
void RemoveRange(IEnumerable<t> list);
}
public class Repository<tentity> : IRepository<tentity> where TEntity : class
{
protected readonly ContextEntity _Context;
public Repository(ContextEntity Context)
{
_Context = Context;
}
public void Add(TEntity obj)
{
_Context.Set<tentity>().Add(obj);
}
public void AddRange(IEnumerable<tentity> list)
{
_Context.Set<tentity>().AddRange(list);
}
public IEnumerable<tentity> Find(Expression<func<tentity, bool="">> predicate)
{
return _Context.Set<tentity>().Where(predicate);
}
public TEntity Get(int ID)
{
return _Context.Set<tentity>().Find(ID);
}
public IEnumerable<tentity> GetAll()
{
return _Context.Set<tentity>().ToList();
}
public void Remove(TEntity obj)
{
_Context.Set<tentity>().Remove(obj);
}
public void RemoveRange(IEnumerable<tentity> list)
{
_Context.Set<tentity>().RemoveRange(list);
}
}
calling of repository class and interface
public interface IStudent : IRepository<students>
{
}
public class StudentRepository : Repository<students>, IStudent
{
public StudentRepository(ContextEntity Context) : base(Context)
{
}
}
below is my unit of work
public interface IUnitOfWork:IDisposable
{
IStudent Students { get; }
int SaveChange();
}
public class UnitOfWork:IUnitOfWork
{
private readonly ContextEntity _context=new ContextEntity();
public IStudent Students { get; private set; }
public UnitOfWork(ContextEntity context)
{
_context = context;
Students = new StudentRepository(context);
//Company
}
public void Dispose()
{
_context.Dispose();
}
public int SaveChange()
{
return _context.SaveChanges();
}
}
ContextEntity obj = new ContextEntity();
using (var unitOfWork=new UnitOfWork(obj))
{
var result= unitOfWork.Students.GetAll();
foreach (var item in result)
{
Console.WriteLine(string.Format("{0} {1}",item.Email,item.City));
}
Console.ReadLine();
}
awaisshabir
8-Aug-16 16:03pm
View
you want to say I'm creating one more table called attribute in that table i saved only option fields and its value like
AttributeID, Name, Fixed,product Type
1 ExpDate, Not Fixed,1
awaisshabir
8-Aug-16 10:37am
View
i didn't understand what do you mean by common attributes is there any example
please send me the links
awaisshabir
7-Aug-16 4:08am
View
its a user requirments
awaisshabir
4-Aug-16 11:57am
View
its create two table with same properties
1) tblRoles
2) AspnetRoles
but i need only one table tblRoles
awaisshabir
13-Jul-16 11:50am
View
jquery DatePicker
awaisshabir
13-Jul-16 11:33am
View
I already try this but its show again 01/01/0001 but i select 13/07/2016
awaisshabir
26-May-16 9:18am
View
i did not received any mgs?
awaisshabir
26-May-16 9:18am
View
i did not received any mgs?
awaisshabir
12-May-16 2:27am
View
my database structure like
menuID MenuName ParentID
1 sale 0
2 Add Sale 1
3 Product 0
4 WareHouse 3
5 Laptop 4
6 Hp 5
7 Toshiba 5
awaisshabir
11-May-16 7:58am
View
i need recursion function
model.Add(new MenuModel { Name = "Sale", Children = new List<menumodel> {
new MenuModel { Name = "Add sale" },
new MenuModel { Name = "View sale" },
new MenuModel { Name = "Delete sale",Children = new List<menumodel> {
new MenuModel { Name = "Add sale" } } } });
awaisshabir
25-Apr-16 9:15am
View
i only need below formate
AccountCategory,
MainFeatures
awaisshabir
21-Apr-16 2:38am
View
Thanks your support Anvil if i assigned menu to a role then how i managed multi roles for a one user.
awaisshabir
3-Mar-16 0:40am
View
i am new in android i just create front end with android studio but i didn't understand how to call WCF rest service from android.
awaisshabir
14-Jan-16 8:22am
View
ajaxcall is a function
function ajaxCall(method, param, callback, errorCallback) {
var request = JSON.stringify(param);
$.ajax({
type: 'POST',
url: 'http://localhost:63704/Goldhay.svc/JSON/' + method,
crossDomain: true,
contentType: "text/json; charset=utf-8",
dataType: 'json',
data: request,
error: errorCallback,
success: callback
});
}
awaisshabir
14-Jan-16 6:12am
View
function SaveService() {
var ServiceID = parseInt($('#serviceID').val());
if (ServiceID > 0) {
var ServiceID = parseInt($('#serviceID').val());
} else {
ServiceID = 0;
}
var Name = $("input[name='ServiceNames']").val();
var Description = $("#Description").val();
var Note = $("#Note").val();
var Active = parseInt($("input[name='IsActives']:checked").val());
ajaxCall("SaveService", { ServicesID: ServiceID, ServiceName: Name, Note: Note, Description: Description, IsActive: Active }, successCallBack, exMessage);
return false;
}
-----------------------
public static ServicesResult LoadServiceGrid(ServicesFilter filter)
{
ServicesResult result = new ServicesResult();
}
awaisshabir
28-Dec-15 6:17am
View
i am calling wcf services from another domain using jquery ajax
awaisshabir
27-Dec-15 16:21pm
View
yes port are open its show cross domain error
awaisshabir
21-Aug-14 4:47am
View
Thanks sir
awaisshabir
20-Aug-14 10:18am
View
Deleted
how to insert multi image here is my code but object reference error occur
----------------------------------------------
public ActionResult ProductSetup(IEnumerable<httppostedfilebase> files)
{
using (EcomShopingEntities Entities = new EcomShopingEntities())
{
ProImage_Shoping obj ;
Guid nimgGUID;
foreach (var file in files)
{
nimgGUID = Guid.NewGuid();
obj = new ProImage_Shoping();
obj.ProductId = 1;
if (!file.FileName.Trim().Equals(""))
{
string strExt = Path.GetExtension(file.FileName);
if (strExt.ToLower() == ".gif" || strExt.ToLower() == ".jpg" || strExt.ToLower() == ".png" || strExt.ToLower() == ".jpeg")
{
string ImgPath = Server.MapPath(ConfigurationManager.AppSettings.Get("product"));
ImgPath = ImgPath + "\\";
if (!System.IO.Directory.Exists(ImgPath))
{
System.IO.Directory.CreateDirectory(ImgPath);
}
ImgPath = ImgPath + "\\" + nimgGUID.ToString().Trim() + file.FileName.Substring(file.FileName.LastIndexOf('.')).ToLower();
file.SaveAs(ImgPath);
obj.ImageName = nimgGUID.ToString().Trim() + file.FileName.Substring(file.FileName.LastIndexOf('.')).ToLower();
obj.IsDeleted = false;
obj.CreatedBy = long.Parse(Session["UserId"].ToString());
obj.CreatedOn = DateTime.Now;
obj.ModifiedBy = obj.CreatedBy;
obj.ModifiedOn = obj.CreatedOn;
Entities.ProImage_Shoping.Add(obj);
Entities.SaveChanges();
}
else
{
}
}
else
{
}
}
awaisshabir
9-Aug-14 8:05am
View
int
awaisshabir
9-Aug-14 8:05am
View
this is id of my table
awaisshabir
7-Aug-14 10:42am
View
thanks
i have another Question
i'm using md5 Encrytion but error was occure
error message
An exception of type 'Microsoft.CSharp.RuntimeBinder.RuntimeBinderException' occurred in System.Core.dll but was not handled in user code
code
@foreach (var item in ViewBag.GetAllInfo)
{
string encty = DentalCloud.AppCode.CryptorEngine.Encrypt(item.ID, true);
awaisshabir
6-Aug-14 6:08am
View
<td class="action-col">
<span class="btn-group">
@*@Html.ActionLink("Views", "Views", new { id = @item.ID, @class = "icon-search" })*@
</span>
</td>
awaisshabir
11-Jul-14 15:03pm
View
thanks sir for ans me i'm solve this issuse
awaisshabir
12-Feb-14 9:45am
View
starting time = 05:00
ending time=6:00
how to generate series of time and load in dropdownlist
series generate like
05:00-05:15
05:15-05:30
05:30-05:45
05:45-6:00
awaisshabir
19-Dec-13 6:26am
View
<li id="abx" runat="server">webdevelopment</li>
---------------------
abx.attribute.add("class","name");
awaisshabir
19-Dec-13 6:24am
View
solution 2 is correct
Show More