Пример #1
0
        public static string getAllAsset(string prefixText, string companyid, string isapprove, string empid)
        {
            Cls_Asset     objts  = new Cls_Asset();
            DataSet       ds1    = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objts.name = "";
            if (isapprove == "1")
            {
                objts.nid    = "";
                objts.action = "selectforautocompleter";
            }
            else
            {
                objts.action = "selectforautocompleterbuemp";
                objts.nid    = empid;
            }

            objts.companyId = companyid;

            ds1 = objts.ManageAsset();
            string result = objgen.serilizeinJson(ds1.Tables[0]);

            return(result);
        }
Пример #2
0
        public static string TimesheetforDashboard(string empid, string companyid, string lastnid, string nid)
        {
            ClsTimeSheet  objts  = new ClsTimeSheet();
            GeneralMethod objgen = new GeneralMethod();

            DataSet ds  = new DataSet();
            string  msg = "failure";

            try
            {
                objts.action    = "select";
                objts.empid     = empid;
                objts.nid       = nid;
                objts.companyId = companyid;
                objts.id        = lastnid;
                ds  = objts.TimesheetforDashboard();
                msg = objgen.serilizeinJson(ds.Tables[0]);
                return(msg);
            }
            catch (Exception ex)
            {
                //msg = ex.Message.ToString();
                return(msg);
            }
        }
        public static string changeStatus(string companyid, string nid, string action, string empid, string projectid, string groupid, string newdate, string status, string remark, string createdby)
        {
            ClsTimeSheet   objts  = new ClsTimeSheet();
            DataSet        ds     = new DataSet();
            GeneralMethod  objgen = new GeneralMethod();
            ClsScheduleBAL objSch = new ClsScheduleBAL();

            objts.projectid = projectid;
            objts.groupid   = groupid;
            objts.empid     = empid;
            objts.date      = newdate;
            objts.remark    = remark;
            objts.Status    = status;
            objts.companyId = companyid;
            objts.nid       = nid;
            if (action == "one")
            {
                objts.action = "setstatus";
            }
            else
            {
                objts.action = "setgroupstatus";
            }

            ds = objts.schedule();
            string result = "";

            result = objgen.serilizeinJson(ds.Tables[0]);
            return(result);
        }
        public static string getinvoicedetailbyinvoicenumber(string invoicenum, string companyid, string recordtype)
        {
            ClsTimeSheet  objts  = new ClsTimeSheet();
            GeneralMethod objgen = new GeneralMethod();
            DataSet       ds     = new DataSet();
            string        msg    = "failure";

            try
            {
                if (recordtype == "nid")
                {
                    objts.nid       = invoicenum;
                    objts.invoiceno = "";
                }
                else
                {
                    objts.nid       = "";
                    objts.invoiceno = invoicenum;
                }
                objts.companyId = companyid;
                objts.action    = "selectinvoicebynumber";
                ds  = objts.GetInvoice();
                msg = objgen.serilizeinJson(ds.Tables[0]);
                return(msg);
            }
            catch (Exception ex)
            {
                //msg = ex.Message.ToString();
                return(msg);
            }
        }
Пример #5
0
        public static string importtaxclient(string path, string cols, string val, string companyid)
        {
            path = HttpContext.Current.Server.MapPath("webfile/temp/" + path);
            DataAccess    objda     = new DataAccess();
            clsTax        objtax    = new clsTax();
            DataSet       ds        = new DataSet();
            GeneralMethod objgen    = new GeneralMethod();
            ImportExcel   objimport = new ImportExcel();

            string[] cols1 = cols.Split('#');
            string[] val1  = val.Split('#');

            DataTable dt    = new DataTable();
            DataTable dtcol = new DataTable();

            dtcol.Columns.Add(new DataColumn("conval"));
            dtcol.Columns.Add(new DataColumn("colname"));


            for (int i = 0; i < cols1.Length; i++)
            {
                if (cols1[i] != "")
                {
                    DataRow ro = dtcol.NewRow();
                    ro["colname"] = cols1[i];
                    char c = Convert.ToChar(val1[i]);
                    ro["conval"] = char.ToUpper(c) - 64;
                    dtcol.Rows.Add(ro);
                }
            }


            objda.action = "5";
            ds           = objda.getImportCol();
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    dt.Columns.Add(new DataColumn(ds.Tables[0].Rows[i]["colname"].ToString()));
                }
            }
            string result = objimport.selectFromExcel(path, dt, dtcol);

            if (result == "-1")
            {
                return(result);
            }
            else
            {
                objtax.companyId = companyid;
                ds     = objtax.Tax_ImportClient_new(dt);
                result = objgen.serilizeinJson(ds.Tables[0]);
                return(result);
            }
        }
        public static string getdata(string nid, string companyid)
        {
            ClsUser       objuser = new ClsUser();
            DataSet       ds      = new DataSet();
            GeneralMethod objgen  = new GeneralMethod();

            objuser.fname        = "";
            objuser.action       = "select";
            objuser.companyid    = companyid;
            objuser.id           = nid;
            objuser.activestatus = "";
            objuser.deptid       = "";
            ds = objuser.ManageEmployee();
            string result = "";

            if (nid == "")
            {
                result = objgen.serilizeinJson(ds.Tables[0]);
            }
            else
            {
                result = objgen.serilizeinJson(ds.Tables[0]);
                if (ds.Tables[1].Rows.Count > 0)
                {
                    result = result + "##{}##" + objgen.serilizeinJson(ds.Tables[1]);
                }
                else
                {
                    result = result + "##{}##" + "";
                }

                if (ds.Tables[2].Rows.Count > 0)
                {
                    result = result + "##{}##" + objgen.serilizeinJson(ds.Tables[2]);
                }
                else
                {
                    result = result + "##{}##" + "";
                }
            }
            return(result);
        }
        public static string getTimeZone()
        {
            DataAccess    objda  = new DataAccess();
            DataSet       ds     = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            ds = objda.getAllTimeZone();
            string result = objgen.serilizeinJson(ds.Tables[0]);

            return(result);
        }
        public static string deleteTask(string nid, string companyid)
        {
            ClsTimeSheet  objda  = new ClsTimeSheet();
            DataSet       ds     = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objda.action    = "deleteTask";
            objda.nid       = nid;
            objda.companyId = companyid;
            ds = objda.Budget_Manage();
            return(objgen.serilizeinJson(ds.Tables[0]));
        }
Пример #9
0
        public static string getassignedtask(string nid, string empid, string status, string clientid, string projectid, string taskid, string fromdate, string todate, string assignedby, string sno, string maxnid)
        {
            ClsTimeSheet objts = new ClsTimeSheet();
            GeneralMethod objgen = new GeneralMethod();
            DataSet ds = new DataSet();
            string msg = "failure";
            try
            {

                if (nid != "")
                {
                    objts.nid = nid;
                    objts.action = "selectbygroupid";
                }
                else
                {
                    objts.empid = empid;
                    objts.action = "selectbypaging";
                    objts.nid = "";
                    objts.Status = status;
                    objts.clientid = clientid;
                    objts.projectid = projectid;
                    objts.taskid = taskid;
                    objts.from = fromdate;
                    objts.to = todate;
                    objts.CreatedBy = assignedby;
                    objts.groupid = sno;
                    objts.hours = maxnid;
                }
                ds = objts.AssignTasks();
                string result = objgen.serilizeinJson(ds.Tables[0]);
                if (ds.Tables[1].Rows.Count > 0)
                {
                    int lastindex = result.LastIndexOf(']');
                    string maxid = "";
                    if (ds.Tables[1].Rows[0]["maxnid"] != null && ds.Tables[1].Rows[0]["maxnid"].ToString() != "")
                    {
                        maxid = "{\"maxnid\":" + ds.Tables[1].Rows[0]["maxnid"].ToString() + "}";
                        if (result != "[]")
                        {
                            maxid = "," + maxid;
                        }
                    }
                    result = result.Insert(lastindex, maxid);

                }
                return result;
            }
            catch (Exception ex)
            {
                return msg;
            }
        }
        public static string getCurrency()
        {
            DataAccess    objda  = new DataAccess();
            DataSet       ds     = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objda.action = "getcurrency";
            ds           = objda.currency();
            string result = objgen.serilizeinJson(ds.Tables[0]);

            return(result);
        }
        public static string getClient(string companyid)
        {
            ClsUser       objuser = new ClsUser();
            DataSet       ds      = new DataSet();
            GeneralMethod objgen  = new GeneralMethod();

            objuser.action    = "selectforautocompleter";
            objuser.companyid = companyid;
            ds = objuser.client();
            string result = objgen.serilizeinJson(ds.Tables[0]);

            return(result);
        }
Пример #12
0
        public static string gettaxlogbynid(string id)
        {
            clsTax        objtax = new clsTax();
            DataSet       ds1    = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objtax.action = "select";
            objtax.nid    = id;
            ds1           = objtax.Tax_Tax_Log();
            string result = objgen.serilizeinJson(ds1.Tables[0]);

            return(result);
        }
        public static string getTasks(string companyid)
        {
            ClsTimeSheet  objts  = new ClsTimeSheet();
            DataSet       ds1    = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objts.action    = "getTasks";
            objts.companyId = companyid;
            ds1             = objts.Budget_Manage();

            string result = objgen.serilizeinJson(ds1.Tables[0]);

            return(result);
        }
        public static string deleterolegroup(string RoleGroupId)
        {
            DataAccess    objda  = new DataAccess();
            DataSet       ds     = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objda.id = RoleGroupId;

            objda.action = "delete";
            ds           = objda.ManageRoleGroup();
            string result = objgen.serilizeinJson(ds.Tables[0]);

            return(result);
        }
        public static string getProject(string companyid, string clientid)
        {
            ClsTimeSheet  objts  = new ClsTimeSheet();
            DataSet       ds     = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objts.action    = "selectforautocompleter1";
            objts.companyId = companyid;
            objts.clientid  = clientid;
            ds = objts.ManageProject();
            string result = objgen.serilizeinJson(ds.Tables[0]);

            return(result);
        }
        public static string getManager(string companyid)
        {
            ClsUser       objuser = new ClsUser();
            DataSet       ds      = new DataSet();
            GeneralMethod objgen  = new GeneralMethod();

            objuser.action    = "selectactive";
            objuser.id        = "";
            objuser.companyid = companyid;
            ds = objuser.ManageEmployee();
            string result = objgen.serilizeinJson(ds.Tables[0]);

            return(result);
        }
        public static string getRoleGroup(string companyid, string nid)
        {
            DataAccess    objda  = new DataAccess();
            DataSet       ds     = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objda.id      = nid;
            objda.company = companyid;
            objda.action  = "select";
            ds            = objda.ManageRoleGroup();
            string result = objgen.serilizeinJson(ds.Tables[0]);

            return(result);
        }
        public static string getInvoices(string companyid)
        {
            ClsTimeSheet  objda  = new ClsTimeSheet();
            GeneralMethod objgen = new GeneralMethod();

            DataSet ds  = new DataSet();
            string  msg = "failure";

            try
            {
                objda.action    = "latest";
                objda.id        = DateTime.Now.Year.ToString();
                objda.companyId = companyid;
                ds  = objda.GetInvoice();
                msg = objgen.serilizeinJson(ds.Tables[0]) + "###" + objgen.serilizeinJson(ds.Tables[1]) + "###" + objgen.serilizeinJson(ds.Tables[2]);
                return(msg);
            }
            catch (Exception ex)
            {
                //msg = ex.Message.ToString();
                return(msg);
            }
        }
        public static string deletedata(string companyid, string nid)
        {
            ClsUser       objda  = new ClsUser();
            DataSet       ds     = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objda.action = "delete";
            objda.id     = nid;

            ds = objda.ManageEmployee();
            string result = objgen.serilizeinJson(ds.Tables[0]);

            return(result);
        }
Пример #20
0
        public static string getTaxClientbyNid(string id, string taxyear)
        {
            clsTax        objtax = new clsTax();
            DataSet       ds1    = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objtax.action  = "select";
            objtax.nid     = id;
            objtax.taxYear = taxyear;
            ds1            = objtax.Tax_Tax_Client();
            string result = objgen.serilizeinJson(ds1.Tables[0]);

            return(result);
        }
Пример #21
0
        public static string getUserList(string userid)
        {
            GeneralMethod objGen = new GeneralMethod();
            DataAccess    objda  = new DataAccess();
            DataSet       ds     = new DataSet();

            objda.loginid = userid;
            objda.action  = "getlastchatwithall";

            ds = objda.chatmessage();
            string result = objGen.serilizeinJson(ds.Tables[0]);

            return(result);
        }
        public static string getProjects(string prefixText, string companyid)
        {
            ClsTimeSheet  objts  = new ClsTimeSheet();
            DataSet       ds1    = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objts.name      = "";
            objts.action    = "selectforautocompleter";
            objts.companyId = companyid;
            objts.nid       = "";
            ds1             = objts.ManageProject();
            string result = objgen.serilizeinJson(ds1.Tables[0]);

            return(result);
        }
Пример #23
0
        public static string getMessage(string fromuserid, string touserid, string companyid)
        {
            GeneralMethod objGen = new GeneralMethod();
            DataAccess    objda  = new DataAccess();
            DataSet       ds     = new DataSet();

            objda.loginid = fromuserid;
            objda.action  = "getallchatwithuserbydate1";
            objda.id      = touserid;
            objda.company = companyid;
            ds            = objda.chatmessage();
            string result = objGen.serilizeinJson(ds.Tables[0]);

            return(result);
        }
        public static string getDesignation(string companyid)
        {
            DataAccess    objda  = new DataAccess();
            DataSet       ds     = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objda.id      = "";
            objda.name    = "";
            objda.company = companyid;
            objda.action  = "select";
            ds            = objda.designation();
            string result = objgen.serilizeinJson(ds.Tables[0]);

            return(result);
        }
Пример #25
0
        public static string gettaxlog(string taxcompanyid, string companyid)
        {
            clsTax        objtax = new clsTax();
            DataSet       ds1    = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objtax.action       = "select";
            objtax.companyId    = companyid;
            objtax.nid          = "";
            objtax.taxCompanyID = taxcompanyid;
            ds1 = objtax.Tax_Tax_Log();
            string result = objgen.serilizeinJson(ds1.Tables[0]);

            return(result);
        }
Пример #26
0
        public static string getdata(string taxcompany, string taxyear, string companyid, string rectype)
        {
            clsTax        objts  = new clsTax();
            DataSet       ds1    = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objts.companyId = companyid;
            objts.nid       = taxcompany;
            objts.taxYear   = taxyear;
            objts.typeid    = rectype;
            ds1             = objts.Tax_Log_Report();
            string result = objgen.serilizeinJson(ds1.Tables[0]);

            return(result);
        }
Пример #27
0
        public static string getTaxClientbyTaxYear(string nid, string taxyear, string companyid)
        {
            clsTax        objtax = new clsTax();
            DataSet       ds1    = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objtax.action = "getbytaxyear";

            objtax.nid       = nid;
            objtax.companyId = companyid;
            objtax.taxYear   = taxyear;
            objtax.name      = "";
            ds1 = objtax.Tax_Tax_Client();
            string result = objgen.serilizeinJson(ds1.Tables[0]);

            return(result);
        }
Пример #28
0
        public static string getFavTaskDetail(string id)
        {
            ClsTimeSheet  objts  = new ClsTimeSheet();
            DataSet       ds     = new DataSet();
            GeneralMethod objgen = new GeneralMethod();

            objts.nid    = id;
            objts.action = "select";
            ds           = objts.manageFavoriteTasks();
            string str = "";

            if (ds.Tables[1].Rows.Count > 0)
            {
                str = objgen.serilizeinJson(ds.Tables[1]);
            }
            return(str);
        }
        public static string getSchDetailData(string companyid, string nid)
        {
            ClsTimeSheet   objts  = new ClsTimeSheet();
            DataSet        ds     = new DataSet();
            GeneralMethod  objgen = new GeneralMethod();
            ClsScheduleBAL objSch = new ClsScheduleBAL();

            objts.action    = "getDetailByGroup";
            objts.companyId = companyid;
            objts.nid       = nid;

            ds = objts.schedule();

            string result = "";

            result = objgen.serilizeinJson(ds.Tables[0]);
            return(result);
        }
Пример #30
0
        public static string savedata(string nid, string name, string address, string city, string state, string zip, string phone, string email, string typeid, string taxtypeID, string taxFormID, string taxYear, string yearEndDate, string dueDate, string prevaig, string prevTotalTax, string taxpaid, string lastYRRefund, string companyId)
        {
            string        result = "";
            clsTax        objtax = new clsTax();
            GeneralMethod objgen = new GeneralMethod();
            DataSet       ds     = new DataSet();

            try
            {
                objtax.action  = "insert";
                objtax.nid     = nid;
                objtax.name    = name;
                objtax.address = address;
                objtax.city    = city;
                objtax.state   = state;
                objtax.zip     = zip;
                objtax.phone   = phone;
                objtax.email   = email;

                objtax.typeid       = typeid;
                objtax.taxtypeID    = taxtypeID;
                objtax.taxYear      = taxYear;
                objtax.taxFormID    = taxFormID;
                objtax.yearEndDate  = yearEndDate;
                objtax.dueDate      = dueDate;
                objtax.prevaig      = prevaig;
                objtax.prevTotalTax = prevTotalTax;

                objtax.taxpaid      = taxpaid;
                objtax.lastYRRefund = lastYRRefund;
                objtax.companyId    = companyId;


                ds     = objtax.Tax_Tax_Client();
                result = objgen.serilizeinJson(ds.Tables[0]);
            }
            catch (Exception ex)
            {
                result = result = @"[{""result"":""0"",""msg"":""Error, Please try again""}]";
            }


            return(result);
        }