Search

Thursday, July 4, 2019

Project Manager Interview Question And Answers


  1. What is your leader ship your style?
    1. Directive
    2. Facilitate
    3. Coaching
    4. Supportive
    5. Autocratic
    6. Delegate
    7. Consultative
    8. Democratic.
  2. Can you please tell me one most important skills that a project Manager need to succeed.
    1. Flexible
    2. Communication: Convey vision, idea, goals 
    3. Team management
    4. Negotiation 
  3. How do you approach newly assigned project
    1. Objective of project
    2. Methodology for this project
    3. Project Layout and resource required to reach goal.
  4. How do you ensure your team stays on track to meet project deadline?
    1. Seamless communication
    2. team should have idea what others are working
    3. need to work as team.
  5. you are a project manager and want to do option A but everyone else on your team wants to do option B what do you do?(Handling conflicts)
    1. need to ask reason why option B. and why it is better than A.
  6. how do you allocate resource in project?
    1. skills, experience, interested, cost, location
  7. how do you handle a team member who is not productive?
    1. find the cause of the unproductive.
      1. Lake of Skills
      2. Lake of Understanding
      3. Lake of interest and Motivation.
    2. Corrective action
      1. Communication
      2. Necessary Training
      3. Motivation and Support
      4. Recognition
  8. How do you delegate task?
    1. explain the task team member and explain importance
    2. Provide Training
    3. take followup during time
    4. Once task done say BIG Thanks.
  9. How do you handle a difficult stakeholder?
    1. I do my homework to understand various stakeholders.
    2. gain insights on how to best prepare for my interactions with the  stakeholder. 
    3. Always I ensure they are feeling heard, valued, and appreciated so that it grows trust and support. 
    4. Also I strive to build better relationships and understanding their motivation which helps to build a good rapport with them in the long run. 
  10.  What Project Metrics do you use to insure project is progression on track?
    1. Schedule and Cost variance
    2. Resource Utilization Matrix
    3. Number of change request
    4. Risk Log.
  11. What is Project Estimation Technique?
    1. Expert Judgement
      1. Historical Data and Estimation Expertise
    2. Analogous Estimating
      1. Historical Data, Less Costly
    3. Parametric Estimating
      1. Published Rates & Statistical Relationship
    4. Bottom UP
      1. PM & Team
    5. 3 - Point Estimates
      1. Pm & Team
*****************************************************************************
Scrum Artifacts.


What is Velocity


Why need a Sprint Retrospective?


Saturday, July 7, 2012

Avoid For Loop in asp.net using XML, using sp_XML_Preparedocument


Save multiple data and Avoid For Loop in asp.net  save data in XML, In stored procedure use sp_XML_Preparedocument

private SqlCommand _MyComm = new SqlCommand();
    private SqlTransaction _MyTrans;
    private string _ConnectionStr = ConfigurationManager.ConnectionStrings("Conn").ToString();


  List Parameter = new List();
        for (int i = 0; i < 10; i++)
        {
            Parameter.Add(i.ToString());
        }

        //Create XML
        StringBuilder XMLValue = new StringBuilder();
        XMLValue.Append("");

        foreach (string d in Parameter)
        {
            if (d != null)
            {
                XMLValue.Append("");
                XMLValue.Append("");
                XMLValue.Append(d);
                XMLValue.Append("");
                XMLValue.Append("");

            }
        }

        XMLValue.Append("");
        XMLValue.Replace("&", "&");

        InsertRecord(XMLValue.ToString());

 private void InsertRecord(string Parameter)
    {
        try
        {
            //Pass XML as string in Database.
            using (SqlConnection dataConnection = new SqlConnection(_ConnectionStr))
            {
                using (SqlCommand dataCommand = dataConnection.CreateCommand())
                {
                    dataConnection.Open();
                    dataCommand.CommandType = CommandType.StoredProcedure;
                    dataCommand.CommandTimeout = 3000;
                    dataCommand.CommandText = "Sp_Insert";
                    dataCommand.Parameters.Add("@xmlData", Parameter);
                    dataCommand.ExecuteNonQuery();
                    dataConnection.Close();
                }
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }

Stored Procedure



Create PROCEDURE [dbo].Sp_Insert
,@xmlData NVARCHAR(max) = ''
AS
BEGIN

DECLARE @resultValue VARCHAR(max),@resultId VARCHAR(max), @iTree INT
  CREATE TABLE  #TempStatus(ItemValue NVARCHAR(200))
 
                                       
--insert record in temp table \\#TempStatus

--what is sp_xml_preparedocument?
--It is a system procedure which is used to read the XML document in the memory and returns a handle to this document. After that you can use OPEN_XML method to iterate through the xml result set.
--Before OPEN_XML, one has to use sp_XML_Preparedocument.

                        EXEC sp_xml_preparedocument @iTree OUTPUT, @xmlNotificationData
                        INSERT INTO #TempStatus
                        SELECT Value FROM OPENXML(@iTree, 'InsertDataValue/DataValue',1)
                        WITH (Value varchar(200) 'Value')    
                        EXEC sp_xml_removedocument @iTree    
                     
--Now u can use temp table for insert purpose.
    --  select *from #TempStatus  
   
   insert into City (cityname) values  select  ItemValue from #TempStatus
DROP TABLE #TempStatus

END

Monday, June 27, 2011

string a = script language="JavaScript"
string b = /script;

string javaScript = a alert('Saving succeeded'); window.location.href = 'MainForm.aspx'; b

RegisterStartupScript("RedirectScript", javaScript);

Wednesday, February 16, 2011

Build failed due to validation errors in. dbml

Error Build failed due to validation errors in D:\xxx\DB.dbml. Open the file and resolve the issues in the Error List, then try rebuilding the project. D:\xxx\DB.dbml

Causes:-
that its a problem with Visual Studio 2008 not loading an assembly correctly, in particular the one with a GUID of 8D8529D3-625D-4496-8354-3DAD630ECC1B

In order to load the assembly correctly you need to get Visual Studio to reset it's packages.
Solution:
1. Open a new command prompt
2. Navigate to C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
3. Run Visual Sudio with the /resetskippkgs argument: devenv /resetskippkgs

Tuesday, November 2, 2010

Excel file convert in pdf using c#, Office Automation

public static void ConvertExcel(string SourceFile, string DestinatioFile)
{

//SourceFile:- c:\ab.xls or .xlsx
//DestinatioFile :- d:\\ab.pdf
object missing = System.Reflection.Missing.Value;
msExcel.Application excel = new msExcel.Application();


try
{
excel.Visible = false;
excel.ScreenUpdating = false;
excel.DisplayAlerts = false;

msExcel.Workbook wbk = excel.Workbooks.Open(SourceFile, missing,
missing, missing, missing, missing, missing,
missing, missing, missing, missing, missing,
missing, missing, missing);
wbk.Activate();


msExcel.XlFixedFormatType fileFormat = msExcel.XlFixedFormatType.xlTypePDF;

// Save document into PDF Format
wbk.ExportAsFixedFormat(fileFormat, DestinatioFile,
missing, missing, missing,
missing, missing, missing,
missing);

object saveChanges = msExcel.XlSaveAction.xlDoNotSaveChanges;
((msExcel._Workbook)wbk).Close(saveChanges, missing, missing);
wbk = null;
}
finally
{
((msExcel._Application)excel).Quit();
excel = null;
}

}

Convert Word file to pdf Using c# , Office Automation

public static void Convertword(string SourceFile, string DestinatioFile)
{
//Source file- file name ex. d:\ab.doc or ab.docx.
//DestinatioFile = d:\ab.pdf

ApplicationClass wordApplication = new ApplicationClass();



Document wordDocument = null;

object paramSourceDocPath = SourceFile;

object paramMissing = Type.Missing;

string paramExportFilePath = DestinatioFile;

WdExportFormat paramExportFormat = WdExportFormat.wdExportFormatPDF;

bool paramOpenAfterExport = false;

WdExportOptimizeFor paramExportOptimizeFor =

WdExportOptimizeFor.wdExportOptimizeForPrint;

WdExportRange paramExportRange = WdExportRange.wdExportAllDocument;

int paramStartPage = 0;

int paramEndPage = 0;

WdExportItem paramExportItem = WdExportItem.wdExportDocumentContent;

bool paramIncludeDocProps = true;

bool paramKeepIRM = true;

WdExportCreateBookmarks paramCreateBookmarks =

WdExportCreateBookmarks.wdExportCreateWordBookmarks;

bool paramDocStructureTags = true;

bool paramBitmapMissingFonts = true;

bool paramUseISO19005_1 = false;

try
{

// Open the source document.

wordDocument = wordApplication.Documents.Open(

ref paramSourceDocPath, ref paramMissing, ref paramMissing,

ref paramMissing, ref paramMissing, ref paramMissing,

ref paramMissing, ref paramMissing, ref paramMissing,

ref paramMissing, ref paramMissing, ref paramMissing,

ref paramMissing, ref paramMissing, ref paramMissing,

ref paramMissing);



// Export it in the specified format.

if (wordDocument != null)

wordDocument.ExportAsFixedFormat(paramExportFilePath,

paramExportFormat, paramOpenAfterExport,

paramExportOptimizeFor, paramExportRange, paramStartPage,

paramEndPage, paramExportItem, paramIncludeDocProps,

paramKeepIRM, paramCreateBookmarks, paramDocStructureTags,

paramBitmapMissingFonts, paramUseISO19005_1,

ref paramMissing);

}

catch (Exception ex)
{

// Respond to the error

}

finally
{

// Close and release the Document object.

if (wordDocument != null)
{

wordDocument.Close(ref paramMissing, ref paramMissing,

ref paramMissing);

wordDocument = null;

}



// Quit Word and release the ApplicationClass object.

if (wordApplication != null)
{

wordApplication.Quit(ref paramMissing, ref paramMissing,

ref paramMissing);

wordApplication = null;

}



GC.Collect();

GC.WaitForPendingFinalizers();

GC.Collect();

GC.WaitForPendingFinalizers();

}
}

Office Automation Configuraiton on Server.


WARNING: Office was not designed, and is not safe, for unattended execution
on a server. Developers who use Office in this manner do so at their own risk.



Regardless, it may absolutely required to use Office in this manner. In these cases,
special configuration must be done to avoid errors on Office startup. The steps
in this article demonstrate how to configure Office to run as the interactive user
account when it is started for Automation.

Configuring Office as the launching user


To set up an Office Automation server as the launching user account, follow these
steps:




Log on to the computer as the Administrator and create a new user account that will
automate Office. In our example, this account is named OfficeAutomationUser.
Create a password for this user account, and select Never expire so that
the password does not have to be changed.


Add the OfficeAutomationUser account to the Administrators group.


Click Start, click Run, and then type DCOMCNFG.
Select the application that you want to automate. The application names are listed
below:

Microsoft Access 97 - Microsoft Access Database

Microsoft Access 2000/2002/2003/2007 - Microsoft Access Application

Microsoft Excel 97/2000/2002/2003/2007 - Microsoft Excel Application

Microsoft Word 97 - Microsoft Word Basic

Microsoft Word 2000/2002/2003/2007 - Microsoft Word Document

Click Properties to open the property dialog box for this application.



Click the Security tab. Verify that Use Default Access Permissions
and Use Default Launch Permissions are selected.


Click the Identity tab. Verify that The Launching User is selected.


Click OK to close the property dialog box and return to the main applications
list dialog box.


In the DCOM Configuration dialog box, click the Default Security tab.


Click Edit Defaults for access permissions. Verify that the following users
are listed in the access permissions, or add the users if they are not listed:

SYSTEM

INTERACTIVE

Everyone

Administrators

OfficeAutomationUser

IUSR_<machinename>*

IWAM_<machinename>*



* These accounts exist only if Internet Information Server (IIS) is installed
on the computer.



Make sure that each user is allowed access and click OK.


Click Edit Defaults for launch permissions. Verify that the following users
are listed in the launch permissions, or add the users if they are not listed:

SYSTEM

INTERACTIVE

Everyone

Administrators

OfficeAutomationUser

IUSR_<machinename>*

IWAM_<machinename>*



* These accounts exist only if IIS is installed on the computer.



Make sure that each user is allowed access, and then click OK.


Click OK to close DCOMCNFG.


Start REGEDIT and verify that the following keys and string values exist
for the Office application that you want to automate:

Microsoft Access 2000/2002/2003/2007:

Key: HKEY_CLASSES_ROOT\AppID\MSACCESS.EXE

AppID: {73A4C9C1-D68D-11D0-98BF-00A0C90DC8D9}



Microsoft Access 97:

Key: HKEY_CLASSES_ROOT\AppID\MSACCESS.EXE

AppID: {8CC49940-3146-11CF-97A1-00AA00424A9F}



Microsoft Excel 97/2000/2002/2003/2007:

Key: HKEY_CLASSES_ROOT\AppID\EXCEL.EXE

AppID: {00020812-0000-0000-C000-000000000046}



Microsoft Word 97/2000/2002/2003/2007:

Key: HKEY_CLASSES_ROOT\AppID\WINWORD.EXE

AppID: {00020906-0000-0000-C000-000000000046}




If these keys do not exist, you can create them by running the following .reg file
on your system:


REGEDIT4

[HKEY_CLASSES_ROOT\AppID\WINWORD.EXE]
"AppID"="{00020906-0000-0000-C000-000000000046}"

[HKEY_CLASSES_ROOT\AppID\EXCEL.EXE]
"AppID"="{00020812-0000-0000-C000-000000000046}"

[HKEY_CLASSES_ROOT\AppID\MSACCESS.EXE]
"AppID"="{73A4C9C1-D68D-11D0-98BF-00A0C90DC8D9}"
     

NOTE: The sample .reg file is for Access 2000 or Access 2002. If you
are using Access 97, change the AppID key to the following:

"AppID"="{8CC49940-3146-11CF-97A1-00AA00424A9F}"




Restart the system. This is required.




Cannot find Microsoft Word Application in DCOM


On 64 bit system with 32 bit Office try this:
  1. Start
  2. Run
  3. mmc -32
  4. File
  5. Add Remove Snap-in
  6. Component Services
  7. Add
  8. OK
  9. Console Root
  10. Component Services
  11. Computers
  12. My Computer
  13. DCOM Config
  14. Microsoft Excel Application

Blog Archive

Contributors