Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.IsPostBack)
     {
         string sql = Convert.ToString(Session["SearchForLetter"]);
         if (!string.IsNullOrEmpty(sql))
         {
             MarketingDS ds = new MarketingDS();
             lvIdf.DataSource = ds.Tables["MarketIDF"];
             lvIdf.DataBind();
             ViewState["MktIDF"] = ds.Tables["MarketIDF"];
             using (con = new SqlConnection())
             {
                 SqlCommand cmd = new SqlCommand();
                 con.ConnectionString = ConfigurationManager.ConnectionStrings["PATENTCN"].ConnectionString;
                 con.Open();
                 cmd.CommandText = sql;
                 cmd.CommandType = CommandType.Text;
                 cmd.Connection  = con;
                 SqlDataReader dr;
                 dr = cmd.ExecuteReader();
                 DataTable dt = new DataTable();
                 dt.Load(dr);
                 gvGenerator.DataSource = dt;
                 gvGenerator.DataBind();
             }
         }
     }
 }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (User.Identity.IsAuthenticated)
     {
         if (User.IsInRole("Admin") || User.IsInRole("Super User") || User.IsInRole("Marketing") || !User.IsInRole("Intern"))
         {
             if (!this.IsPostBack)
             {
                 System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-GB");
                 txtRefNo.Text       = DisputeNo();
                 txtcreatedDate.Text = DateTime.Now.ToString("dd/MM/yyyy");
                 SqlCommand cmd = new SqlCommand("select itemList from listItemMaster where category = 'Dispute' and Grouping='DisputeGroup' order by itemlist", con);
                 con.ConnectionString = ConfigurationManager.ConnectionStrings["PATENTCN"].ConnectionString;
                 con.Open();
                 SqlDataReader dr = cmd.ExecuteReader();
                 ddlGroup.DataTextField  = "itemList";
                 ddlGroup.DataValueField = "itemList";
                 ddlGroup.DataSource     = dr;
                 ddlGroup.DataBind();
                 ddlGroup.Items.Insert(0, new ListItem("", ""));
                 dr.Close();
                 SqlCommand cmd1 = new SqlCommand("select itemList from listItemMaster where category = 'Dispute' and Grouping='Status' order by itemlist", con);
                 dr = cmd1.ExecuteReader();
                 ddlStatus.DataTextField  = "itemList";
                 ddlStatus.DataValueField = "itemList";
                 ddlStatus.DataSource     = dr;
                 ddlStatus.DataBind();
                 dr.Close();
                 con.Close();
                 MarketingDS ds = new MarketingDS();
                 con.ConnectionString = ConfigurationManager.ConnectionStrings["PATENTCN"].ConnectionString;
                 con.Open();
                 LvMDoc.DataSource = ds.Tables["MDOC"];
                 LvMDoc.DataBind();
                 ViewState["MDOC"] = ds.Tables["MDOC"];
                 lvIdf.DataSource  = ds.Tables["MarketIDF"];
                 lvIdf.DataBind();
                 ViewState["MktIDF"]   = ds.Tables["MarketIDF"];
                 lvActivity.DataSource = ds.Tables["DisputeActivity"];
                 lvActivity.DataBind();
                 ViewState["DisputeActivity"] = ds.Tables["DisputeActivity"];
                 con.Close();
                 //imgBtnSubmit.Visible = (!User.IsInRole("View"));
             }
         }
         else
         {
             Server.Transfer("Unauthorized.aspx");
         }
     }
 }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (User.Identity.IsAuthenticated)
        {
            if (User.IsInRole("Admin") || User.IsInRole("Super User") || User.IsInRole("Marketing") || !User.IsInRole("Intern"))
            {
                if (!this.IsPostBack)
                {
                    System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-GB");
                    MarketingDS ds = new MarketingDS();
                    lvIdf.DataSource = ds.Tables["MarketIDF"];
                    lvIdf.DataBind();
                    ViewState["MktIDF"]   = ds.Tables["MarketIDF"];
                    lvActivity.DataSource = ds.Tables["MarketActivity"];
                    lvActivity.DataBind();
                    ViewState["MktActivity"] = ds.Tables["MarketActivity"];
                    txtMktgProjNo.Text       = MarketNo();

                    con.ConnectionString = ConfigurationManager.ConnectionStrings["PATENTCN"].ConnectionString;
                    con.Open();
                    string     sql = "select itemList from listItemMaster where category like 'MarketingStatus' order by itemlist";
                    SqlCommand cmd = new SqlCommand();
                    cmd.CommandText = sql;
                    cmd.CommandType = CommandType.Text;
                    cmd.Connection  = con;
                    SqlDataReader dr;
                    dr = cmd.ExecuteReader();
                    ddlStatus.DataTextField  = "itemList";
                    ddlStatus.DataValueField = "itemList";
                    ddlStatus.DataSource     = dr;
                    ddlStatus.DataBind();
                    ddlStatus.Items.Insert(0, new ListItem("", ""));
                    con.Close();
                    imgBtnSubmit.Visible = (!User.IsInRole("View"));
                }
            }
            else
            {
                Server.Transfer("Unauthorized.aspx");
            }
        }

        /*if (Request.IsAuthenticated)
         *  {
         *
         * else
         *  {
         *      Response.Redirect("unautherized.aspx");
         *  }*/
    }
Example #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string id = Request.QueryString["id"].ToString();

        con.ConnectionString = ConfigurationManager.ConnectionStrings["PATENTCN"].ConnectionString;
        SqlCommand cmd = new SqlCommand();

        if (id == "PaymentReport")
        {
            this.Title = "Payment Report";
            string Fileno = Request.QueryString["fileno"].ToString();
            string sql    = "select fileno,title,Inventor1 as Inventor,department,applcn_no as ApplicationNo,filing_dt as FilingDt,pat_no as PatentNo,pat_dt as PatentDt from patdetails where fileno = '" + Fileno.Trim() + "'";
            cmd.CommandType = CommandType.Text;
            cmd.CommandText = sql;
            cmd.Connection  = con;
            con.Open();
            SqlDataAdapter sda = new SqlDataAdapter();
            sda.SelectCommand = cmd;
            PaymentDS ds = new PaymentDS();
            sda.Fill(ds, "PatentInfo");

            string sql1;
            sql1              = "Select SlNo,PType,Country,CostGroup,Activity,PaymentOrChequeDt,PaymentRefOrChequeNo,PaymentAmtINR,Party,Year,InvoiceNo,InvoiceDt from PatentPayment where fileno = '" + Fileno.Trim() + "' order by SlNo";
            cmd.CommandText   = sql1;
            sda.SelectCommand = cmd;
            sda.Fill(ds, "PatentPayment");

            rptDoc.Load(Server.MapPath("~/Report/PaymentRpt.rpt"));
            rptDoc.SetDataSource(ds);
            CrystalReportViewer1.ReportSource             = rptDoc;
            CrystalReportViewer1.HasToggleGroupTreeButton = false;
            con.Close();
        }
        else if (id == "IPReport")
        {
            this.Title = "International Patent Report";
            string Fileno = Request.QueryString["fileno"].ToString();
            string sql    = "select fileno,title,Inventor1 as Inventor,department,applcn_no as ApplicationNo,filing_dt as FilingDt,pat_no as PatentNo,pat_dt as PatentDt from patdetails where fileno = '" + Fileno.Trim() + "'";
            cmd.CommandType = CommandType.Text;
            cmd.CommandText = sql;
            cmd.Connection  = con;
            con.Open();
            SqlDataAdapter sda = new SqlDataAdapter();
            sda.SelectCommand = cmd;
            International ds = new International();
            sda.Fill(ds, "IndPatent");

            string sql1;
            sql1              = "select FileNo,subFileNo,RequestDt,Country,Type,Attorney,ApplicationNo,FilingDt,PatentNo,PatentDt,Status,SubStatus from INTERNATIONAL where fileno = '" + Fileno.Trim() + "' order by subFileNo";
            cmd.CommandText   = sql1;
            sda.SelectCommand = cmd;
            sda.Fill(ds, "InternationalPatent");

            rptDoc.Load(Server.MapPath("~/Report/InternationalRpt.rpt"));
            rptDoc.SetDataSource(ds);
            CrystalReportViewer1.ReportSource             = rptDoc;
            CrystalReportViewer1.HasToggleGroupTreeButton = false;
            con.Close();
        }
        else if (id == "ReceiptReport")
        {
            this.Title = "Receipt Report";
            string Fileno = Request.QueryString["fileno"].ToString();
            string sql    = "select fileno,title,Inventor1 as Inventor,department,applcn_no as ApplicationNo,filing_dt as FilingDt,pat_no as PatentNo,pat_dt as PatentDt from patdetails where fileno = '" + Fileno.Trim() + "'";
            cmd.CommandType = CommandType.Text;
            cmd.CommandText = sql;
            cmd.Connection  = con;
            con.Open();
            SqlDataAdapter sda = new SqlDataAdapter();
            sda.SelectCommand = cmd;
            ReceiptDS ds = new ReceiptDS();
            sda.Fill(ds, "IndianPat");

            string sql1;
            sql1              = "select EntryDt,FileNo,SlNo,TechTransferNo,Party,PartyRefNo,SubmissionDt,TransType,TransDescription,PaymentGroup,PaymentDescription,Currency,ForeignCost,ExRate,Cost_Rs,PaymentDate,PaymentRef,Year from patentreceipt where fileno = '" + Fileno.Trim() + "' order by SlNo";
            cmd.CommandText   = sql1;
            sda.SelectCommand = cmd;
            sda.Fill(ds, "ReceiptDetails");

            rptDoc.Load(Server.MapPath("~/Report/RptReceipt.rpt"));
            rptDoc.SetDataSource(ds);
            CrystalReportViewer1.ReportSource             = rptDoc;
            CrystalReportViewer1.HasToggleGroupTreeButton = false;
            con.Close();
        }
        else if (id == "Contract")
        {
            this.Title = "Contract Report";
            string ContractNo = Request.QueryString["ContractNo"].ToString();
            string sql        = "select ContractNo,(select Description from listitemmaster where category like 'ContractAgreementType' and itemList =Agreement.AgreementType) as AgreementType,AgreementNo,Title,Scope,Party,CoordinatingPerson,(select DeptName from department where deptcode=Agreement.Dept) as Dept,EffectiveDt,ExpiryDt,Remark,TechTransfer,Status from Agreement where ContractNo = '" + ContractNo.Trim() + "'";
            cmd.CommandType = CommandType.Text;
            cmd.CommandText = sql;
            cmd.Connection  = con;
            con.Open();
            SqlDataAdapter sda = new SqlDataAdapter();
            sda.SelectCommand = cmd;
            dsContract ds = new dsContract();
            sda.Fill(ds, "dtContract");

            // string sql1;
            //// sql1 = "select ContractNo,SlNo,ActionType,Narration,ClauseRef,ResponsePerson,TargetDt,Remark,ActionStatus from AgreementAction where ContractNo = '" + ContractNo.Trim() + "' order by SlNo desc";
            //sql1 = "select SlNo,Event,Frequency,ExecutionDate,Basis,DeclDueAmt,InvoiceNo,InvoiceRaised,RecieptNo,RecieptDate,Mode,AmountInRs,Remarks,Status from Royality where ContractNo = '" + ContractNo.Trim() + "' order by SlNo desc";
            //cmd.CommandText = sql1;
            //sda.SelectCommand = cmd;
            //sda.Fill(ds, "dtContractAction");

            rptDoc.Load(Server.MapPath("~/Report/rptContract.rpt"));
            rptDoc.SetDataSource(ds);
            CrystalReportViewer1.ReportSource             = rptDoc;
            CrystalReportViewer1.HasToggleGroupTreeButton = false;
            con.Close();
        }
        else if (id == "MarketingProject")
        {
            string ProjNo = Request.QueryString["ProjNo"].ToString();
            string sql1   = "select MktgProjectNo,MktgTitle,MktgCompany,MktgGroup,ProjectValue,ValueRealization,Status,Remarks from marketingProject where MktgProjectNo ='" + ProjNo + "'";
            string sql2   = "select fileno,title,inventor1,applcn_no,status from patdetails where fileno in (select fileno from marketingIDF where mktgProjectNo ='" + ProjNo + "')";
            string sql3   = "select ActivityDt,Channel,ActivityType,Remarks from marketingActivity where mktgProjectNo ='" + ProjNo + "' order by slno desc";
            con.Open();
            SqlDataAdapter sda = new SqlDataAdapter(sql1, con);
            SqlDataAdapter sdb = new SqlDataAdapter(sql2, con);
            SqlDataAdapter sdc = new SqlDataAdapter(sql3, con);
            MarketingDS    ds  = new MarketingDS();
            sda.Fill(ds, "MarketProject");
            sdb.Fill(ds, "MarketIDF");
            sdc.Fill(ds, "MarketActivity");
            rptDoc.Load(Server.MapPath("~/Report/rptMarketing.rpt"));
            rptDoc.SetDataSource(ds);
            CrystalReportViewer1.ReportSource             = rptDoc;
            CrystalReportViewer1.HasToggleGroupTreeButton = false;
            con.Close();
        }
    }